Sign in Join
FPDoc Onlineexperiment

Exception class

In unit sysutils

Base class of all exceptions.

Declaration

pascal
Exception = class(TObject)

Inheritance

  1. Exception
  2. TObject

Descends from it: EAbort EAbstractError EArgumentException EArray EAssertionFailed EBase64DecodingException EBitsError ECacheError ECFError ECGIException ECollectionError EComponentError EConvertError EDaemon EDatabaseError EDateTimeException EDBEditError EDictionaryError EDirectoryNotFoundException EDOMError EDuplicate EDynHashArrayException EEncodingError EExprParser EExprScanner EExternal EFileNotFoundException EFormatError EFreeType EGraphicException EGridException EHeapMemoryError EHelpSystemException EHTTP EICPException EIniCol EInOutError EInstallerError EInterfaceException EIntfCastError EInvalidCast EInvalidContainer EInvalidDate EInvalidGridOperation EInvalidInsert EInvalidOperation EInvalidOpException EInvalidUtf8 EIPCError EJSON EKeyNotFound ELayoutException EListError EListError ELocalTimeInvalid ELogError EMediator EMenuError EMOFileError EMonitor ENoConstructException ENoDynLibsSupport ENoThreadSupport ENotImplemented ENotSupportedException ENoWideStringSupport EObjectCheck EObjectDisposed EObserver EObserverException EOperationCancelled EOSError EPackageError EParserError EPathNotFoundException EPathTooLongException EPOFileError EPrinter EProcess EProgrammerNotFound EPropertyConvertError EPropertyError EPropReadOnly EPropWriteOnly EResNotFound EResourceException ESafecallException EScrollBar EShellCtrl ESigQuit ESingleInstance EStreamColl EStreamError EStringListError ESyncObjectException ETemplateParser EThread EThreadError ETreeNodeError EVariantError EVersionInfo EVersionStringTableException EXMLReadError EXPathEvaluationError EZipError MDSError TLazListClassesIndexError TLockedMapModifyException TMREWException

Description

Exception is the base class for all exception handling routines in the RTL and FCL. While it is possible to raise an exception with any class descending from TObject, it is recommended to use Exception as the basis of exception class objects: the Exception class introduces properties to associate a message and a help context with the exception being raised. What is more, the SysUtils unit sets the necessary hooks to catch and display unhandled exceptions: in such cases, the message displayed to the end user, will be the message stored in the exception class.

See also

Properties

HelpContextpublicHelp context associated with the exception.
MessagepublicMessage associated with the exception.

Methods

CreatepublicConstructs a new exception object with a given message.
CreateFmtpublicConstructs a new exception object and formats a new message.
CreateRespublicConstructs a new exception object and gets the message from a resource.
CreateResFmtpublicConstructs a new exception object and formats the message from a resource.
CreateHelppublicConstructs a new exception object and sets the help context.
CreateFmtHelppublicConstructs a new exception object and sets the help context and formats the message.
CreateResHelppublicConstructs a new exception object and sets the help context and gets the message from a resource.
CreateResFmtHelppublicConstructs a new exception object and sets the help context and formats the message from a resource.
ToStringpublicNicely formatted version of the exception message.
GetBaseExceptionpublic

Inherited

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.