- Function errh::CreationTime(err, fmt)
errh::CreationTime
The function errh::CreationTime returns the creation time of the
error.
errh::CreationTime(
err, ! (input) an element
fmt ! (optional) a format string.
)
Arguments
- err
An element in the set
errh::PendingErrorsreferencing an error.- fmt
A string that holds the date and time format used in the returned string. Valid format strings are described in Format of Time Slots and Periods When this argument is not given, or if
fmtis not a valid string format, the full reference date format “%c%y-%m-%d %H:%M:%S” will be used.
Return Value
Returns the creation time of the error as a string.
Note
When err does not reference an element in errh::PendingErrors or when the
current filter is the filter To Global Collector an additional error
will be raised.
Example
1block
2 pr_divideByZero();
3onerror _ep_err do
4 _sp_crea := errh::CreationTime(_ep_err, "%c%y-%m-%d %H:%M:%S");
5 errh::MarkAsHandled( _ep_err, 1 );
6endblock ;
See also
The function CurrentToString.