Child pages
  • ServoyException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE


HTML Table
classservoy sReturnTypes
Table Row (tr)
styleheight: 30px;
Table Head (th)
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
DataException

HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#ABSTRACT_FORM
Exception code for ABSTRACT_FORM.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#ACQUIRE_LOCK_FAILURE
Exception code for ACQUIRE_LOCK_FAILURE.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#BAD_SQL_SYNTAX
Exception code for BAD_SQL_SYNTAX.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#CLIENT_NOT_AUTHORIZED
Exception code for CLIENT_NOT_AUTHORIZED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#DATA_ACCESS_RESOURCE_FAILURE
Exception code for DATA_ACCESS_RESOURCE_FAILURE.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#DATA_INTEGRITY_VIOLATION
Exception code for DATA_INTEGRITY_VIOLATION.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#DEADLOCK
Exception code for DEADLOCK.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#DELETE_NOT_GRANTED
Exception code for DELETE_NOT_GRANTED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#EXECUTE_PROGRAM_FAILED
Exception code for EXECUTE_PROGRAM_FAILED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#INCORRECT_LOGIN
Exception code for INCORRECT_LOGIN.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#INVALID_INPUT
Exception code for INVALID_INPUT.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#INVALID_INPUT_FORMAT
Exception code for INVALID_INPUT_FORMAT.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#INVALID_RESULTSET_ACCESS
Exception code for INVALID_RESULTSET_ACCESS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#MAINTENANCE_MODE
Exception code for MAINTENANCE_MODE.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_ACCESS
Exception code for NO_ACCESS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_CREATE_ACCESS
Exception code for NO_CREATE_ACCESS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_DELETE_ACCESS
Exception code for NO_DELETE_ACCESS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_LICENSE
Exception code for NO_LICENSE.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_MODIFY_ACCESS
Exception code for NO_MODIFY_ACCESS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_PARENT_DELETE_WITH_RELATED_RECORDS
Exception code for NO_PARENT_DELETE_WITH_RELATED_RECORDS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NO_RELATED_CREATE_ACCESS
Exception code for NO_RELATED_CREATE_ACCESS.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#PERMISSION_DENIED
Exception code for PERMISSION_DENIED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#RECORD_LOCKED
Exception code for RECORD_LOCKED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#RECORD_VALIDATION_FAILED
Exception code for RECORD_VALIDATION_FAILED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#SAVE_FAILED
Exception code for SAVE_FAILED.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#UNKNOWN_DATABASE_EXCEPTION
Exception code for UNKNOWN_DATABASE_EXCEPTION.

HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getErrorCode()
Returns the error code for this ServoyException.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getMessage()
Returns the string message for this ServoyException.

HTML Table
idconstant
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Constants Details
Table Body (tbody)
idABSTRACT_FORM
classnode
Table Row (tr)
idname
Table Cell (td)
ABSTRACT_FORM
Table Row (tr)
iddes
Table Cell (td)
Exception code for ABSTRACT_FORM.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idACQUIRE_LOCK_FAILURE
classnode
Table Row (tr)
idname
Table Cell (td)
ACQUIRE_LOCK_FAILURE
Table Row (tr)
iddes
Table Cell (td)
Exception code for ACQUIRE_LOCK_FAILURE.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idBAD_SQL_SYNTAX
classnode
Table Row (tr)
idname
Table Cell (td)
BAD_SQL_SYNTAX
Table Row (tr)
iddes
Table Cell (td)
Exception code for BAD_SQL_SYNTAX.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idCLIENT_NOT_AUTHORIZED
classnode
Table Row (tr)
idname
Table Cell (td)
CLIENT_NOT_AUTHORIZED
Table Row (tr)
iddes
Table Cell (td)
Exception code for CLIENT_NOT_AUTHORIZED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idDATA_ACCESS_RESOURCE_FAILURE
classnode
Table Row (tr)
idname
Table Cell (td)
DATA_ACCESS_RESOURCE_FAILURE
Table Row (tr)
iddes
Table Cell (td)
Exception code for DATA_ACCESS_RESOURCE_FAILURE.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idDATA_INTEGRITY_VIOLATION
classnode
Table Row (tr)
idname
Table Cell (td)
DATA_INTEGRITY_VIOLATION
Table Row (tr)
iddes
Table Cell (td)
Exception code for DATA_INTEGRITY_VIOLATION.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idDEADLOCK
classnode
Table Row (tr)
idname
Table Cell (td)
DEADLOCK
Table Row (tr)
iddes
Table Cell (td)
Exception code for DEADLOCK.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idDELETE_NOT_GRANTED
classnode
Table Row (tr)
idname
Table Cell (td)
DELETE_NOT_GRANTED
Table Row (tr)
iddes
Table Cell (td)
Exception code for DELETE_NOT_GRANTED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idEXECUTE_PROGRAM_FAILED
classnode
Table Row (tr)
idname
Table Cell (td)
EXECUTE_PROGRAM_FAILED
Table Row (tr)
iddes
Table Cell (td)
Exception code for EXECUTE_PROGRAM_FAILED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idINCORRECT_LOGIN
classnode
Table Row (tr)
idname
Table Cell (td)
INCORRECT_LOGIN
Table Row (tr)
iddes
Table Cell (td)
Exception code for INCORRECT_LOGIN.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idINVALID_INPUT
classnode
Table Row (tr)
idname
Table Cell (td)
INVALID_INPUT
Table Row (tr)
iddes
Table Cell (td)
Exception code for INVALID_INPUT.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idINVALID_INPUT_FORMAT
classnode
Table Row (tr)
idname
Table Cell (td)
INVALID_INPUT_FORMAT
Table Row (tr)
iddes
Table Cell (td)
Exception code for INVALID_INPUT_FORMAT.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idINVALID_RESULTSET_ACCESS
classnode
Table Row (tr)
idname
Table Cell (td)
INVALID_RESULTSET_ACCESS
Table Row (tr)
iddes
Table Cell (td)
Exception code for INVALID_RESULTSET_ACCESS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idMAINTENANCE_MODE
classnode
Table Row (tr)
idname
Table Cell (td)
MAINTENANCE_MODE
Table Row (tr)
iddes
Table Cell (td)
Exception code for MAINTENANCE_MODE.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_ACCESS
classnode
Table Row (tr)
idname
Table Cell (td)
NO_ACCESS
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_ACCESS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_CREATE_ACCESS
classnode
Table Row (tr)
idname
Table Cell (td)
NO_CREATE_ACCESS
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_CREATE_ACCESS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_DELETE_ACCESS
classnode
Table Row (tr)
idname
Table Cell (td)
NO_DELETE_ACCESS
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_DELETE_ACCESS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_LICENSE
classnode
Table Row (tr)
idname
Table Cell (td)
NO_LICENSE
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_LICENSE.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_MODIFY_ACCESS
classnode
Table Row (tr)
idname
Table Cell (td)
NO_MODIFY_ACCESS
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_MODIFY_ACCESS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_PARENT_DELETE_WITH_RELATED_RECORDS
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_PARENT_DELETE_WITH_RELATED_RECORDS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNO_RELATED_CREATE_ACCESS
classnode
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Exception code for NO_RELATED_CREATE_ACCESS.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idPERMISSION_DENIED
classnode
Table Row (tr)
idname
Table Cell (td)
PERMISSION_DENIED
Table Row (tr)
iddes
Table Cell (td)
Exception code for PERMISSION_DENIED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idRECORD_LOCKED
classnode
Table Row (tr)
idname
Table Cell (td)
RECORD_LOCKED
Table Row (tr)
iddes
Table Cell (td)
Exception code for RECORD_LOCKED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idRECORD_VALIDATION_FAILED
classnode
Table Row (tr)
idname
Table Cell (td)
RECORD_VALIDATION_FAILED
Table Row (tr)
iddes
Table Cell (td)
Exception code for RECORD_VALIDATION_FAILED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idSAVE_FAILED
classnode
Table Row (tr)
idname
Table Cell (td)
SAVE_FAILED
Table Row (tr)
iddes
Table Cell (td)
Exception code for SAVE_FAILED.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idUNKNOWN_DATABASE_EXCEPTION
classnode
Table Row (tr)
idname
Table Cell (td)
UNKNOWN_DATABASE_EXCEPTION
Table Row (tr)
iddes
Table Cell (td)
Exception code for UNKNOWN_DATABASE_EXCEPTION.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idgetErrorCode
classnode
Table Row (tr)
idname
Table Cell (td)
getErrorCode
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getErrorCode
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the error code for this ServoyException. Can be one of the constants declared in ServoyException.
Table Row (tr)
idret
Table Cell (td)
Returns
Number – the error code for this ServoyException. Can be one of the constants declared in ServoyException.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//this sample script should be attached to onError method handler in the solution settings
var e = arguments[0];
application.output("Exception Object: "+e)
application.output("MSG: "+e.getMessage())
if (e instanceof ServoyException)
{
	application.output("is a ServoyException")
	application.output("Errorcode: "+e.getErrorCode())
	if (e.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)
			{
				application.output("SQL: "+record.exception.getSQL())
				application.output("SQLState: "+record.exception.getSQLState())
				application.output("VendorErrorCode: "+record.exception.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 Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMessage
classnode
Table Row (tr)
idname
Table Cell (td)
getMessage
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getMessage
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the string message for this ServoyException.
Table Row (tr)
idret
Table Cell (td)
Returns
String – the string message for this ServoyException.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//this sample script should be attached to onError method handler in the solution settings
var e = arguments[0];
application.output("Exception Object: "+e)
application.output("MSG: "+e.getMessage())
if (e instanceof ServoyException)
{
	application.output("is a ServoyException")
	application.output("Errorcode: "+e.getErrorCode())
	if (e.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)
			{
				application.output("SQL: "+record.exception.getSQL())
				application.output("SQLState: "+record.exception.getSQLState())
				application.output("VendorErrorCode: "+record.exception.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 Row (tr)
classlastDetailRow
Table Cell (td)