Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Constants Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for ABSTRACT_FORM. This code is used when a form, that cannot be created, is shown (for example, a form without parts). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
ACQUIRE_LOCK_FAILURE |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for ACQUIRE_LOCK_FAILURE. This code is used when a database failed to lock a row or table. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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( |
|
|
|
| ""recordexception.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 |
|
|
|
|
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FF70DBE3-534C-4666-B099-5F13865B04F5}{tr:id=name}{td}h6.getParameters{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}Object[]{span}{span:id=iets|style=float: left; font-weight: bold;}getParameters{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_des|text=|trigger=button}{sub-section}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_des|trigger=none|class=sIndent}Returns the parameters of the SQL query that caused this DataException in an array.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_ret|text=|trigger=button}{sub-section}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_ret|trigger=none|class=sIndent}Object[] -- the parameters of the SQL query that caused this DataException in an array.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_see|text=|trigger=button}{sub-section}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_see|text=|trigger=button}{sub-section}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_sam|text=|trigger=button}{sub-section}{sub-section:FF70DBE3-534C-4666-B099-5F13865B04F5_sam|class=sIndent|trigger=none}{code:language=javascript}
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]);
}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=27766F6F-1F4C-4D2E-904B-10C16C27EE04}{tr:id=name}{td}h6.getSQL{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQL{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_des|text=|trigger=button}{sub-section}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_des|trigger=none|class=sIndent}Returns the SQL query that caused this DataException.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_ret|text=|trigger=button}{sub-section}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_ret|trigger=none|class=sIndent}[String] -- the SQL query that caused this DataException.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_see|text=|trigger=button}{sub-section}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_see|text=|trigger=button}{sub-section}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_sam|text=|trigger=button}{sub-section}{sub-section:27766F6F-1F4C-4D2E-904B-10C16C27EE04_sam|class=sIndent|trigger=none}{code:language=javascript}
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
application.output("SQL: " + record.exception.getSQL());
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=90F4F6CA-EB0E-4522-8B14-F366A4EF048D}{tr:id=name}{td}h6.getSQLState{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQLState{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_des|text=|trigger=button}{sub-section}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_des|trigger=none|class=sIndent}Returns the SQLState for this DataException.
This is a "SQLstate" string, which follows either the XOPEN SQLstate conventions or the SQL 99 conventions.
The values of the SQLState string are described in the appropriate spec.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_ret|text=|trigger=button}{sub-section}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_ret|trigger=none|class=sIndent}[String] -- the SQLState for this DataException.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_see|text=|trigger=button}{sub-section}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_see|text=|trigger=button}{sub-section}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_sam|text=|trigger=button}{sub-section}{sub-section:90F4F6CA-EB0E-4522-8B14-F366A4EF048D_sam|class=sIndent|trigger=none}{code:language=javascript}
var record = array[i];
application.output(record.exception);
if (record.exception instanceof DataException)
{
application.output("SQLState: " + record.exception.getSQLState());
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9D8A2742-0440-4B3F-8373-C8967590D499}{tr:id=name}{td}h6.getValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}Object{span}{span:id=iets|style=float: left; font-weight: bold;}getValue{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_des|text=|trigger=button}{sub-section}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_des|trigger=none|class=sIndent}Returns the value for this DataException.
The value is the object thrown in table pre-insert, pre-update or pre-delete triggers.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_ret|text=|trigger=button}{sub-section}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_ret|trigger=none|class=sIndent}Object -- the value for this DataException.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_see|text=|trigger=button}{sub-section}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_see|text=|trigger=button}{sub-section}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_sam|text=|trigger=button}{sub-section}{sub-section:9D8A2742-0440-4B3F-8373-C8967590D499_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
BAD_SQL_SYNTAX |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for BAD_SQL_SYNTAX. This code is used when a database exception is recognized as an sql syntax error. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
CLIENT_NOT_AUTHORIZED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for CLIENT_NOT_AUTHORIZED. This code is used when an client performs an action that requires the user to be logged in and the user has not logged in yet. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | DATA_ACCESS_RESOURCE_FAILURE |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
DATA_ACCESS_RESOURCE_FAILURE |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for DATA_ACCESS_RESOURCE_FAILURE. This code is used when a database exception received an error accessing storage devices. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | DATA_INTEGRITY_VIOLATION |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
DATA_INTEGRITY_VIOLATION |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for DATA_INTEGRITY_VIOLATION. This code is used when a database exception is recognized as an integrity exception (like constraint violation). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for DEADLOCK. This code is used when a deadlock is detected by the database. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
DELETE_NOT_GRANTED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for DELETE_NOT_GRANTED. This code is used when a record deletion was rejected by a pre-delete Servoy trigger. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
EXECUTE_PROGRAM_FAILED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for EXECUTE_PROGRAM_FAILED. This code is used when an external program was not executed correctly. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
INCORRECT_LOGIN |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for INCORRECT_LOGIN. This code is used when the user enters invalid credentials. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for INVALID_INPUT. This code is used when the user enters data that could not be validated. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | INVALID_RESULTSET_ACCESS |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
INVALID_RESULTSET_ACCESS |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for INVALID_RESULTSET_ACCESS. This code is used when a data is requested that is not selected in the sql. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
MAINTENANCE_MODE |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for MAINTENANCE_MODE. This code is used when a client could not be registered with the server because the server is in maintenance mode. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_ACCESS. This code is used when a user wants to view data and this is disallowed by security settings. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
NO_CREATE_ACCESS |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_CREATE_ACCESS. This code is used when a user wants to create new records and this is disallowed by security settings. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
NO_DELETE_ACCESS |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_DELETE_ACCESS. This code is used when a user wants to delete data and this is disallowed by security settings. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
NO_LICENSE |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_LICENSE. This code is used when a client could not be registered with the server because of license limitations. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
NO_MODIFY_ACCESS |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_MODIFY_ACCESS. This code is used when a user wants to update data and this is disallowed by security settings. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | NO_PARENT_DELETE_WITH_RELATED_RECORDS |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_PARENT_DELETE_WITH_RELATED_RECORDS. This code is used when a record could not be deleted because a non-empty relation exists for the record that does not allow parent delete when having related records. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | NO_RELATED_CREATE_ACCESS |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for NO_RELATED_CREATE_ACCESS. This code is used when a user wants to create new related records and this is disallowed by security settings. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
PERMISSION_DENIED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for PERMISSION_DENIED. This code is used when a database exception is recognized as a authorization error. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
RECORD_LOCKED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for RECORD_LOCKED. This code is used when a record could not be updated or deleted because it is locked by another client. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | RECORD_VALIDATION_FAILED |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
RECORD_VALIDATION_FAILED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for RECORD_VALIDATION_FAILED. This code is used when a record update/insert was rejected by a pre-update/insert Servoy trigger. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
SAVE_FAILED |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for SAVE_FAILED. This code is used when a javascript exception occurred during saving data to the database. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | UNEXPECTED_UPDATE_COUNT |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
UNEXPECTED_UPDATE_COUNT |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for UNEXPECTED_UPDATE_COUNT. This code is used when a data could not be deleted or updated when expected (for example when a record was deleted outside Servoy and a Servoy client wants to update the record). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
Table Body (tbody) |
---|
id | UNKNOWN_DATABASE_EXCEPTION |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
UNKNOWN_DATABASE_EXCEPTION |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Exception code for UNKNOWN_DATABASE_EXCEPTION. This code is used when an unrecognized database exception has occurred. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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 |
|
|
|
|
|