May 04, 2024 05:12 Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
Constants Summary
Number
ABSTRACT_FORM
Exception code for ABSTRACT_FORM.
Number
ACQUIRE_LOCK_FAILURE
Exception code for ACQUIRE_LOCK_FAILURE.
Number
BAD_SQL_SYNTAX
Exception code for BAD_SQL_SYNTAX.
Number
CLIENT_NOT_AUTHORIZED
Exception code for CLIENT_NOT_AUTHORIZED.
Number
DATA_ACCESS_RESOURCE_FAILURE
Exception code for DATA_ACCESS_RESOURCE_FAILURE.
Number
DATA_INTEGRITY_VIOLATION
Exception code for DATA_INTEGRITY_VIOLATION.
Number
DEADLOCK
Exception code for DEADLOCK.
Number
DELETE_NOT_GRANTED
Exception code for DELETE_NOT_GRANTED.
Number
EXECUTE_PROGRAM_FAILED
Exception code for EXECUTE_PROGRAM_FAILED.
Number
INCORRECT_LOGIN
Exception code for INCORRECT_LOGIN.
Number
INVALID_INPUT
Exception code for INVALID_INPUT.
Number
INVALID_RESULTSET_ACCESS
Exception code for INVALID_RESULTSET_ACCESS.
Number
MAINTENANCE_MODE
Exception code for MAINTENANCE_MODE.
Number
NO_ACCESS
Exception code for NO_ACCESS.
Number
NO_CREATE_ACCESS
Exception code for NO_CREATE_ACCESS.
Number
NO_DELETE_ACCESS
Exception code for NO_DELETE_ACCESS.
Number
NO_LICENSE
Exception code for NO_LICENSE.
Number
NO_MODIFY_ACCESS
Exception code for NO_MODIFY_ACCESS.
Number
NO_PARENT_DELETE_WITH_RELATED_RECORDS
Exception code for NO_PARENT_DELETE_WITH_RELATED_RECORDS.
Number
NO_RELATED_CREATE_ACCESS
Exception code for NO_RELATED_CREATE_ACCESS.
Number
PERMISSION_DENIED
Exception code for PERMISSION_DENIED.
Number
RECORD_LOCKED
Exception code for RECORD_LOCKED.
Number
RECORD_VALIDATION_FAILED
Exception code for RECORD_VALIDATION_FAILED.
Number
SAVE_FAILED
Exception code for SAVE_FAILED.
Number
UNEXPECTED_UPDATE_COUNT
Exception code for UNEXPECTED_UPDATE_COUNT.
Number
UNKNOWN_DATABASE_EXCEPTION
Exception code for UNKNOWN_DATABASE_EXCEPTION.
Methods Summary
Number
getErrorCode()
Returns the error code for this ServoyException.
String
getMessage()
Returns the string message for this ServoyException.
Array
getParameters()
Returns the parameters of the SQL query that caused this DataException in an array.
String
getSQL()
Returns the SQL query that caused this DataException.
String
getSQLState()
Returns the SQLState for this DataException.
String
getScriptStackTrace()
Returns the script stack trace for this ServoyException if this could be created.
String
getStackTrace()
Returns the stack trace for this ServoyException.
Object
getValue()
Returns the value for this DataException.
Number
getVendorErrorCode()
Returns the error code of the error thrown by the back-end database server.
Constants Details
ABSTRACT_FORM
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
ACQUIRE_LOCK_FAILURE
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
BAD_SQL_SYNTAX
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
CLIENT_NOT_AUTHORIZED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
DATA_ACCESS_RESOURCE_FAILURE
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
DATA_INTEGRITY_VIOLATION
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
DEADLOCK
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
DELETE_NOT_GRANTED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
EXECUTE_PROGRAM_FAILED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
INCORRECT_LOGIN
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
INVALID_INPUT
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
INVALID_RESULTSET_ACCESS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
MAINTENANCE_MODE
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_ACCESS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_CREATE_ACCESS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_DELETE_ACCESS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_LICENSE
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_MODIFY_ACCESS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_PARENT_DELETE_WITH_RELATED_RECORDS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
NO_RELATED_CREATE_ACCESS
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
PERMISSION_DENIED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
RECORD_LOCKED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
RECORD_VALIDATION_FAILED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
SAVE_FAILED
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
UNEXPECTED_UPDATE_COUNT
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
UNKNOWN_DATABASE_EXCEPTION
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
Methods Details
getErrorCode()
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
getMessage()
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
getParameters()
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
var param = record.exception.getParameters();
for (j = 0; j < param.length; j++)
{
application.output("SQL Parameter [" + j + "]: " + param[j]);
}
}
getSQL()
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
application.output("SQL: " + record.exception.getSQL());
}
getSQLState()
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
application.output("SQLState: " + record.exception.getSQLState());
}
getScriptStackTrace()
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
getStackTrace()
//this sample script should be attached to onError method handler in the solution settings
application.output('Exception Object: '+ex)
application.output('MSG: '+ex.getMessage())
if (ex instanceof ServoyException)
{
/** @type {ServoyException} */
var servoyException = ex;
application.output("is a ServoyException")
application.output("Errorcode: "+servoyException.getErrorCode())
var trace = "";
if (ex.getScriptStackTrace) trace = servoyException.getScriptStackTrace();
else if (servoyException.getStackTrace) trace = servoyException.getStackTrace();
if (servoyException.getErrorCode() == ServoyException.SAVE_FAILED)
{
plugins.dialogs.showErrorDialog( 'Error', 'It seems you did not fill in a required field', 'OK');
//Get the failed records after a save
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
/** @type {DataException} */
var dataException = record.exception;
application.output('SQL: '+dataException.getSQL())
application.output('SQLState: '+dataException.getSQLState())
application.output('VendorErrorCode: '+dataException.getVendorErrorCode())
}
}
return false
}
}
//if returns false or no return, error is not reported to client; if returns true error is reported
//by default error report means logging the error, in smart client an error dialog will also show up
return true
getValue()
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
application.output("VALUE: " + record.exception.getValue());
}
getVendorErrorCode()
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
application.output("VendorErrorCode: " + record.exception.getVendorErrorCode());
}