ShowException

Show the current exception to the user.

Declaration

Source position: sysutilh.inc line 241

  procedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer);

Description

ShowException shows a message stating that a ExceptObject was raised at address ExceptAddr. It uses ExceptionErrorMessage to create the message, and is aware of the fact whether the application is a console application or a GUI application. For a console application, the message is written to standard error output. For a GUI application, OnShowException is executed.

Errors

If, for a GUI application, OnShowException is not set, no message will be displayed to the user.

The exception message can be at most 255 characters long: It is possible that no memory can be allocated on the heap, so ansistrings are not available, so a shortstring is used to display the message.

See also

Name Description
ExceptAddr Current exception address.
ExceptionErrorMessage Return a message describing the exception.
ExceptObject Current Exception object.