mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add missing files.
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
package org.postgresql.jdbc2;
|
||||
|
||||
import org.postgresql.util.*;
|
||||
import java.sql.*;
|
||||
|
||||
/**
|
||||
* This class extends java.sql.BatchUpdateException, and provides our
|
||||
* internationalisation handling.
|
||||
*/
|
||||
class PBatchUpdateException extends java.sql.BatchUpdateException {
|
||||
|
||||
private String message;
|
||||
|
||||
public PBatchUpdateException(
|
||||
String error, Object arg1, Object arg2, int[] updateCounts ) {
|
||||
|
||||
super(updateCounts);
|
||||
|
||||
Object[] argv = new Object[2];
|
||||
argv[0] = arg1;
|
||||
argv[1] = arg2;
|
||||
translate(error,argv);
|
||||
}
|
||||
|
||||
private void translate(String error, Object[] args) {
|
||||
message = MessageTranslator.translate(error,args);
|
||||
}
|
||||
|
||||
// Overides Throwable
|
||||
public String getLocalizedMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
// Overides Throwable
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
// Overides Object
|
||||
public String toString()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user