nsIXPCException 编辑
js/src/xpconnect/idl/xpcexception.idl
Scriptable 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
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'.
- message - A custom message set by the thrower (defaults to 'exception')
- result - The nsresult associated with this exception (defaults to
Components.results.NS_ERROR_FAILURE
) - stack - The stack chain (defaults to the current stack)
- data - additional data object of your choice (defaults to null)
- inner - An inner exception that triggered this, if available
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论