|
|
System.Exception Class |
|
|
Description | |
|
The System.Exception class is the .Net version of the original Delphi Exception class. The latter is now mapped to the .Net version.
Information about exceptions occuring in an application is stored in the Exception object, available for interrogation in an exception handling routine.
Exception handling uses either the Try..Except..End construct or the Try..Finally..End construct. You must nest the former in the latter to get a Try..Except..Finally..End construct.
Note that the actual object generated for your application exception will be an ApplicationException object, a class which inherits from Exception.
|
|
Syntax | |
|
Constructor Create ; | Constructor Create ( |
ErrorMessage : String ); | Constructor Create ( |
Info : SerializationInfo; Context : StreamingContext ); | Constructor Create ( |
ErrorMessage : String; InnerException : Exception ); |
|
Methods | |
|
| GetBaseException | Gets the lowest level base Exception that caused the current exception |
| ToString | Converts the Exception message and other information into a string |
|
|
|
Properties | |
|
HelpLink | | String | | Get/set a link to the help file associated with this exception. |
HResult | | Integer | | Hex value contains severity code, a facility code, and an error code |
InnerException | | Exception | | The inner exception creating this exception, or null |
Message | | String | | The exception error message |
Source | | String | | The name of the application creating the error |
StackTrace | | String | | A string representation of the stack call trace at the time of the exception |
TargetSite | | MethodBase | | Get the name of the method that generates this exception |
|
Microsoft MSDN links | |
|
|
|
|
|
|