EROServerException
Overview
The EROServerException provides the base class for all custom exceptions defined in your application's RODL file and provides the basic functionality for enabling exceptions to be propagated from the server to the client and re-raised properly. It also can be used to get the server stack trace from the exception messages of the .NET based servers.
For example, in the TROBinMessage function EROServerException is used to get server stack trace from the .NET part of the exception message.
function TROBinMessage.ReadException: Exception;
var
lExceptionName, lMessage, lServerStackTrace: string;
begin
...
//Stream: TStream;
// try to read .net part
if Stream.Position+4 <= Stream.Size then begin
lServerStackTrace := UTF8ToString(Stream_TryReadUTF8String(fStream));
if Result is EROServerException then
(Result as EROServerException).ServerStackTrace := lServerStackTrace;
end;
fDestroyStream:=False; // we destroy stream in TROTransportChannel.Dispatch
end;
The EROServerException class can be used in custom message class to register and hold the server stack trace from the exception messages of the .NET based servers.
Location
- Unit: uROExceptions.pas
- Ancestry: Exception | EROException | EROServerException
Assign virtual (declared in EROException)
Copies data from a given source.
procedure Assign(Source: EROException)
Parameters:
- Source:
Clone (declared in EROException)
function Clone: EROException
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.
ReadException virtual (declared in EROException)
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.
ServerStackTrace
Contains a stack trace for the exception as received from the server, where supported. (Currently, only .NET based servers send back exception stack traces.)
property ServerStackTrace: UnicodeString read write
TryGetAttribute (declared in EROException)
class function TryGetAttribute(aName: string; out aValue: string): Boolean
Parameters:
- aName:
- aValue:
WriteException virtual (declared in EROException)
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 WriteException(aSerializer: TROBaseSerializer)
Parameters:
- aSerializer: The serializer object containing the exception to read.
ServerStackTrace
Contains a stack trace for the exception as received from the server, where supported. (Currently, only .NET based servers send back exception stack traces.)
property ServerStackTrace: UnicodeString 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:
Assign virtual (declared in EROException)
Copies data from a given source.
procedure Assign(Source: EROException)
Parameters:
- Source:
Clone (declared in EROException)
function Clone: EROException
ReadException virtual (declared in EROException)
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 virtual (declared in EROException)
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 WriteException(aSerializer: TROBaseSerializer)
Parameters:
- aSerializer: The serializer object containing the exception to read.