ScriptException

Overview

ScriptException is the class for EcmaScript exceptions.

Location

 

constructor Create

Creates an instance of ScriptException

constructor Create(anExceptionMessage: string; aLine: Integer; aColumn: Integer; aEvent: ROUTF8String; aInnerStackTrace: ROUTF8String; a_Type: ScriptExceptionType)

Parameters:

  • anExceptionMessage: Specifies exception message
  • aLine: Specifies line number where exception happened
  • aColumn: Specifies column number where exception happened
  • aEvent: Specifies event
  • aInnerStackTrace: Specifies inner stack trace. For Delphi, it isn't filled.
  • a_Type: Specifies type of script exception

Clone    (declared in EROException)

function Clone: EROException

Column

Specifies column number where exception happened.

property Column: Integer read write

Event

Specifies event

property Event: ROUTF8String read write

GetAttributeCount  virtual    (declared in EROException)

Returns the number of custom attributes defined for the class. The code generator always overrides this method to return actual data for the certain class.

This method is for internal use for SOAP processing.

class function GetAttributeCount: Integer

GetAttributeName  virtual    (declared in EROException)

Returns the name of custom attribute defined for the class, with the specified index. The code generator always overrides this method to return actual data for the certain class.

This method is for internal use for SOAP processing.

class function GetAttributeName(aIndex: Integer): string

Parameters:

  • aIndex: The index of attribute.

GetAttributeValue  virtual    (declared in EROException)

Returns the value of custom attribute defined for the class, with the specified index. The code generator always overrides this method to return actual data for the certain class.

This method is for internal use for SOAP processing.

class function GetAttributeValue(aIndex: Integer): string

Parameters:

  • aIndex: The index of attribute.

InnerStackTrace

Specifies inner stack trace. For Delphi, it isn't filled.

property InnerStackTrace: ROUTF8String read write

Line

Specifies line number where exception happened.

property Line: Integer read write

ReadException  override

Deserializes the exception instance from the serializer object. The code generator always overrides this method. The method is called intenally, users have no need to call it.

procedure ReadException(aSerializer: TROBaseSerializer)

Parameters:

  • aSerializer: The serializer object containing the exception to read.

TryGetAttribute    (declared in EROException)

class function TryGetAttribute(aName: string; out aValue: string): Boolean

Parameters:

  • aName:
  • aValue:

WriteException  override

Serializes the exception instance to the serializer object. The code generator always overrides this method. The method is called intenally, users have no need to call it.

procedure WriteException(aSerializer: TROBaseSerializer)

Parameters:

  • aSerializer: The serializer object to write the instance into.

 

Column

Specifies column number where exception happened.

property Column: Integer read write

Event

Specifies event

property Event: ROUTF8String read write

InnerStackTrace

Specifies inner stack trace. For Delphi, it isn't filled.

property InnerStackTrace: ROUTF8String read write

Line

Specifies line number where exception happened.

property Line: Integer read write

 

GetAttributeCount  virtual    (declared in EROException)

Returns the number of custom attributes defined for the class. The code generator always overrides this method to return actual data for the certain class.

This method is for internal use for SOAP processing.

class function GetAttributeCount: Integer

GetAttributeName  virtual    (declared in EROException)

Returns the name of custom attribute defined for the class, with the specified index. The code generator always overrides this method to return actual data for the certain class.

This method is for internal use for SOAP processing.

class function GetAttributeName(aIndex: Integer): string

Parameters:

  • aIndex: The index of attribute.

GetAttributeValue  virtual    (declared in EROException)

Returns the value of custom attribute defined for the class, with the specified index. The code generator always overrides this method to return actual data for the certain class.

This method is for internal use for SOAP processing.

class function GetAttributeValue(aIndex: Integer): string

Parameters:

  • aIndex: The index of attribute.

TryGetAttribute    (declared in EROException)

class function TryGetAttribute(aName: string; out aValue: string): Boolean

Parameters:

  • aName:
  • aValue:

 

constructor Create

Creates an instance of ScriptException

constructor Create(anExceptionMessage: string; aLine: Integer; aColumn: Integer; aEvent: ROUTF8String; aInnerStackTrace: ROUTF8String; a_Type: ScriptExceptionType)

Parameters:

  • anExceptionMessage: Specifies exception message
  • aLine: Specifies line number where exception happened
  • aColumn: Specifies column number where exception happened
  • aEvent: Specifies event
  • aInnerStackTrace: Specifies inner stack trace. For Delphi, it isn't filled.
  • a_Type: Specifies type of script exception

Clone    (declared in EROException)

function Clone: EROException

ReadException  override

Deserializes the exception instance from the serializer object. The code generator always overrides this method. The method is called intenally, users have no need to call it.

procedure ReadException(aSerializer: TROBaseSerializer)

Parameters:

  • aSerializer: The serializer object containing the exception to read.

WriteException  override

Serializes the exception instance to the serializer object. The code generator always overrides this method. The method is called intenally, users have no need to call it.

procedure WriteException(aSerializer: TROBaseSerializer)

Parameters:

  • aSerializer: The serializer object to write the instance into.

See Also