Unicorn XML Toolkit
Version 1.00.00

Namespace EcmaScript
Class CEcmaScriptException

class CEcmaScriptException: public IException {
public:
    CEcmaScriptException(IException *pException);
    ~CEcmaScriptException();
public:
    CString ToString();
public:
    void SetProgramName(const CString &strProgramName);
    void SetFunctionName(const CString &strFunctionName);
    void SetLineNumber(int nLineNumber);
    void SetValue(const XValue &pValue);
    void SetObject(const XObject &pObject);
    CString GetProgramName();
    CString GetFunctionName();
    int GetLineNumber();
    XValue GetValue();
    XObject GetObject();
    };

The top-level ECMAScript exception.

Top-level ECMAScript exceptions are used as wrappers for all exceptions thrown during evaluation of ECMAScript programs.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CValue, CObject
Constructor/Destructor Summary
CEcmaScriptException (IException *pException);
����������Constructs the ECMAScript exception.
~CEcmaScriptException ();
����������Destroys the ECMAScript exception.

Function Summary
CString ToString ();
����������Returns the string representation of this ECMAScript exception.
void SetProgramName (const CString &strProgramName);
����������Sets a program name associated with this ECMAScript exception.
void SetFunctionName (const CString &strFunctionName);
����������Sets a function name associated with this ECMAScript exception.
void SetLineNumber (int nLineNumber);
����������Sets a source line number associated with this ECMAScript exception.
void SetValue (const XValue &pValue);
����������Sets a value associated with this ECMAScript exception.
void SetObject (const XObject &pObject);
����������Sets an object associated with this ECMAScript exception.
CString GetProgramName ();
����������Returns a program name associated with this ECMAScript exception.
CString GetFunctionName ();
����������Returns a function name associated with this ECMAScript exception.
int GetLineNumber ();
����������Returns a source line number associated with this ECMAScript exception.
XValue GetValue ();
����������Returns a value associated with this ECMAScript exception.
XObject GetObject ();
����������Returns an object associated with the ECMAScript exception.

Constructor/Destructor Detail

CEcmaScriptException

CEcmaScriptException(IException *pException);

Constructs the ECMAScript exception.

Parameters:
pException - the exception to be wrapped in this ECMAScript exception

~CEcmaScriptException

~CEcmaScriptException();

Destroys the ECMAScript exception.

Function Detail

ToString

CString ToString();

Returns the string representation of this ECMAScript exception.

Returns:
the string representation of this ECMAScript exception

SetProgramName

void SetProgramName(const CString &strProgramName);

Sets a program name associated with this ECMAScript exception.

Parameters:
strProgramName - the program name

SetFunctionName

void SetFunctionName(const CString &strFunctionName);

Sets a function name associated with this ECMAScript exception.

Parameters:
strFunctionName - the function name

SetLineNumber

void SetLineNumber(int nLineNumber);

Sets a source line number associated with this ECMAScript exception.

Parameters:
nLineNumber - the source line number

SetValue

void SetValue(const XValue &pValue);

Sets a value associated with this ECMAScript exception.

Parameters:
pValue - the value

SetObject

void SetObject(const XObject &pObject);

Sets an object associated with this ECMAScript exception.

Parameters:
pValue - the object

GetProgramName

CString GetProgramName();

Returns a program name associated with this ECMAScript exception.

Returns:
the program name associated with this ECMAScript exception; the empty string if there is no program name associated

GetFunctionName

CString GetFunctionName();

Returns a function name associated with this ECMAScript exception.

Returns:
the function name associated with this ECMAScript exception; the empty string if there is no function name associated

GetLineNumber

int GetLineNumber();

Returns a source line number associated with this ECMAScript exception.

Returns:
the source line number associated with this ECMAScript exception; -1 if there is no source line number associated

GetValue

XValue GetValue();

Returns a value associated with this ECMAScript exception.

Returns:
the value associated with this ECMAScript exception; NULL if there is no value associated

GetObject

XObject GetObject();

Returns an object associated with the ECMAScript exception.

Returns:
the object associated with this ECMAScript exception; NULL if there is no object associated

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.