System.SysUtils.Exception.ToString
Delphi
function ToString: string; override;
C++
virtual System::UnicodeString __fastcall ToString();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | Exception |
Description
Returns a string containing the exception message.
For example, the following code prints "This is my exception" to the standard output:
myException := Exception.Create('This is my exception');
Writeln(myException.toString());
Exception* myException = new Exception("This is my exception");
std::wcout << myException->ToString().c_str();