Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Exception class: Difference between revisions

From Catglobe Wiki
Tungocman (talk | contribs)
No edit summary
Tungocman (talk | contribs)
No edit summary
Line 11: Line 11:
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
}}
}}
Also see [[Exception_Handling|exception handling]] for more information.
 
=== <span style="color:#DF8621;">'''See also'''</span>  ===
*[[Exception_Handling|exception handling]] for more information about [[Exception Handling|exception handling (error runtime handling)]].


=== <span style="color:#DF8621;">'''Examples'''</span>  ===
=== <span style="color:#DF8621;">'''Examples'''</span>  ===

Revision as of 05:42, 20 December 2011

Exception



Represents an error object. This object can contain only non-user (system) thrown errors - the errors that not thrown by throw expression


Methods

  • string ToString() - The string representation of the object.

Properties

  • Exception InnerException { get; } - Gets the Exception instance that caused the current exception.
  • string Message { get; } - Gets a message that describes the current exception.
  • string ObjectTypeName { get; } - The name of the type of object.
  • string StackTrace { get; } - Return the internal stack trace, useful when sending a bugreport to Catglobe.
  • TypeInformation TypeInformation { get; } - Get information about this class.


See also

Examples

Type below script into the CGScript prompt to get its result:

object e;
try {
      s = n;
} 
catch(e) {
    print("====e.ToString()======");
    print(e.ToString());
    print("\n====e.Message======");
    print(e.Message);
    print("\n====e.StackTrace======");
    print(e.StackTrace);
}