Difference between revisions of "TScript.TOnException"

From Soldat Community Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
==Declaration==
 
==Declaration==
   function (ErrorCode: TErrorType; Message, UnitName, FunctionName: string; Row, Col: Cardinal): Boolean
+
   procedure (ErrorCode: TErrorType; Message, UnitName, FunctionName: string; Row, Col: Cardinal);
 
   ErrorCode: See below!
 
   ErrorCode: See below!
 
   Message: Error message to be displayed
 
   Message: Error message to be displayed
Line 9: Line 9:
 
   FunctionName: Function that caused an error
 
   FunctionName: Function that caused an error
 
   Row,Col: Cursor position in file where error occured
 
   Row,Col: Cursor position in file where error occured
  Result: True if exception is handled, otherwise script is disabled.
 
  
 
==Error Types==
 
==Error Types==
  ErNoError, erCannotImport, erInvalidType, ErInternalError, erInvalidHeader, erInvalidOpcode, erInvalidOpcodeParameter,
+
{{expand|descriptions when the errors appear}}
  erNoMainProc, erOutOfGlobalVarsRange, erOutOfProcRange, ErOutOfRange, erOutOfStackRange, ErTypeMismatch,
+
*ErNoError
  erUnexpectedEof, erVersionError, ErDivideByZero, ErMathError, erCouldNotCallProc, erOutofRecordRange,
+
*erCannotImport
  erOutOfMemory, erException, erNullPointerException, erNullVariantError, erInterfaceNotSupported, erCustomError
+
*erInvalidType
 
+
*ErInternalError
 +
*erInvalidHeader
 +
*erInvalidOpcode
 +
*erInvalidOpcodeParameter
 +
*erNoMainProc
 +
*erOutOfGlobalVarsRange
 +
*erOutOfProcRange
 +
*ErOutOfRange
 +
*erOutOfStackRange
 +
*ErTypeMismatch
 +
*erUnexpectedEof
 +
*erVersionError
 +
*ErDivideByZero
 +
*ErMathError
 +
*erCouldNotCallProc
 +
*erOutofRecordRange
 +
*erOutOfMemory
 +
*erException
 +
*erNullPointerException
 +
*erNullVariantError
 +
*erInterfaceNotSupported
 +
*erCustomError
 
[[Category:Types]]
 
[[Category:Types]]

Latest revision as of 20:55, 23 June 2016

Description

Type used by TScript.OnException as an event handler type.

Declaration

 procedure (ErrorCode: TErrorType; Message, UnitName, FunctionName: string; Row, Col: Cardinal);
  ErrorCode: See below!
  Message: Error message to be displayed
  UnitName: Unit in which the error occured
  FunctionName: Function that caused an error
  Row,Col: Cursor position in file where error occured

Error Types

Expand with: descriptions when the errors appear
  • ErNoError
  • erCannotImport
  • erInvalidType
  • ErInternalError
  • erInvalidHeader
  • erInvalidOpcode
  • erInvalidOpcodeParameter
  • erNoMainProc
  • erOutOfGlobalVarsRange
  • erOutOfProcRange
  • ErOutOfRange
  • erOutOfStackRange
  • ErTypeMismatch
  • erUnexpectedEof
  • erVersionError
  • ErDivideByZero
  • ErMathError
  • erCouldNotCallProc
  • erOutofRecordRange
  • erOutOfMemory
  • erException
  • erNullPointerException
  • erNullVariantError
  • erInterfaceNotSupported
  • erCustomError