js/src/xpconnect/idl/xpcexception.idlScriptable
These exception objects are the preferred types of exceptions when implementing xpcom interfaces in JavaScript.
Inherits from: nsIException Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

Method overview

void initialize(in string aMessage, in nsresult aResult, in string aName, in nsIStackFrame aLocation, in nsISupports aData, in nsIException aInner);
xpcexJSVal stealJSVal(); Native code only!
void stowJSVal(in xpcexJSContextPtr cx, in xpcexJSVal val); Native code only!

Methods

initialize()

void initialize(
  in string aMessage,
  in nsresult aResult,
  in string aName,
  in nsIStackFrame aLocation,
  in nsISupports aData,
  in nsIException aInner
);
Parameters
aMessage
aResult
aName
aLocation
aData
aInner

Native code only!

stealJSVal

xpcexJSVal stealJSVal();
Parameters

None.

Return value

 

Native code only!

stowJSVal

void stowJSVal(
  in xpcexJSContextPtr cx,
  in xpcexJSVal val
);
Parameters
cx
val

Remarks

Components.Exception is a JavaScript constructor to create nsIXPCException objects. The call signature of the constructor is:

Components.Exception(message, result, stack, data, inner)

all parameters are optional and the appropriate placeholder is 'unknown'.