Public Member Functions | Public Attributes

nsIExceptionService Interface Reference

import "nsIExceptionService.idl";

Inheritance diagram for nsIExceptionService:
Collaboration diagram for nsIExceptionService:

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)

Public Attributes

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

Member Function Documentation

void nsIExceptionService::registerExceptionProvider ( in nsIExceptionProvider  provider,
in PRUint32  moduleCode 
)

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.

void nsIExceptionService::unregisterExceptionProvider ( in nsIExceptionProvider  provider,
in PRUint32  moduleCode 
)

Member Data Documentation

Obtains an exception manager for the current thread.


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