Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIExceptionService Interface Reference

import "nsIExceptionService.idl";

Inheritance diagram for nsIExceptionService:
Inheritance graph
[legend]
Collaboration diagram for nsIExceptionService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void registerExceptionProvider (in nsIExceptionProvider provider, in PRUint32 moduleCode)
 Installs an "exception provider" which is capable of translating an nsresult into an exception.
void unregisterExceptionProvider (in nsIExceptionProvider provider, in PRUint32 moduleCode)
void setCurrentException (in nsIException error)
 Sets (or clears with nsnull) the current error on the this thread.
nsIException getCurrentException ()
 Gets the current error for the current thread, or NULL if no error.
nsIException getExceptionFromProvider (in nsresult rc, in nsIException defaultException)
 Gets an exception from a registered exception provider.

Public Attributes

readonly attribute
nsIExceptionManager 
currentExceptionManager
 Obtains an exception manager for the current thread.

Detailed Description

Definition at line 73 of file nsIExceptionService.idl.


Member Function Documentation

Gets the current error for the current thread, or NULL if no error.

Gets an exception from a registered exception provider.

This has no effect on the "current exception"

Installs an "exception provider" which is capable of translating an nsresult into an exception.

This enables error providers to return simple nsresults and only provide rich errors when specifically requested. It also has the advantage of allowing code like the DOM to handle all errors in a single function rather than at each XPCOM entry point. NOTE: This interface must be thread-safe - it will be called on whatever thread needs the error translation performed.

Sets (or clears with nsnull) the current error on the this thread.


Member Data Documentation

Obtains an exception manager for the current thread.

Definition at line 76 of file nsIExceptionService.idl.


The documentation for this interface was generated from the following file: