Codecore Logo
Quick Search
»
Advanced Search »

Exception Object

RSS
Represents an error that occurred during script execution.

The Exception object is usually used with throw or try-catch-finally statements. You can also rethrow a caught exception using the throw statement.


Constructors

Exception( String )

Initializes a new Exception instance with a specified error message.

Syntax:

Exception( String message )

Parameters:

value: A String describing the error.

Example:


throw new Exception( "example" );
ex = new Exception( "example" );
throw ex;

Instance Properties

Message

Gets a String that describes the current exception.

Accessibility : Read Only

Type: String

Example:


try
{
  xxxx // This line will cause an exception.
}
catch (ex)
{
  msg = ex.Message;
}
Privacy Policy | Conditions Of Use

Copyright ©2014 Codecore Technologies, All rights reserved.