IError
- Namespace
- ZCore
This interface should be implemented by all objects that might have errors. The methods of this interface allow to inspect the error description, error code (...) of said object.
INTERFACE IError
Properties
Error
If the object aborts its execution with an error, this is indicated by this property returning TRUE
.
Information about the error may be retrieved by utilizing the methods that are implemented from the
IError.
Returns TRUE
if a fault occured within a sequence or the initialization phase
of an object, respectively. If this property returns TRUE
, use
to get insights about the origin of the fault.
PROPERTY Error : BOOL
Property Value
- BOOL
Methods
ErrorId
Returns the error code of the first error source for this object. The method recursively goes down the error stack until the initial source of error of this object can be found. For performance reasons, the error stack is not cleared when the error state is reset. So this method should always used in conjunction with Error.
METHOD ErrorId () : UDINT
Returns
- UDINT
ErrorMessage
Returns the error description of the first error source for this object. The method recursively goes down the error stack until the initial source of error of this object can be found. For performance reasons, the error stack is not cleared when the error state is reset. So this method should always used in conjunction with Error.
METHOD ErrorMessage () : ZString
Returns
ErrorSource
This method returns the direct error source of this object. This method can then be used to retrieve the actual error source by using the method of the returned IError.
METHOD ErrorSource () : IError
Returns
TraceErrorStack
This method is used internally when recording an error trace.
METHOD TraceErrorStack (
trace : IErrorTrace)
Inputs
trace
IErrorTrace