Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
nsErrorService Class Reference

#include <nsErrorService.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIERRORSERVICE 
nsErrorService ()
void registerErrorStringBundle (in short errorModule, in string stringBundleURL)
 Registers a string bundle URL for an error module.
void unregisterErrorStringBundle (in short errorModule)
 Registers a string bundle URL for an error module.
string getErrorStringBundle (in short errorModule)
 Retrieves a string bundle URL for an error module.
void registerErrorStringBundleKey (in nsresult error, in string stringBundleKey)
 Registers a key in a string bundle for an nsresult error code.
void unregisterErrorStringBundleKey (in nsresult error)
 Unregisters a key in a string bundle for an nsresult error code.
string getErrorStringBundleKey (in nsresult error)
 Retrieves a key in a string bundle for an nsresult error code.

Static Public Member Functions

static NS_METHOD Create (nsISupports *outer, const nsIID &aIID, void **aInstancePtr)

Protected Attributes

nsInt2StrHashtable mErrorStringBundleURLMap
nsInt2StrHashtable mErrorStringBundleKeyMap

Private Member Functions

 ~nsErrorService ()

Detailed Description

Definition at line 57 of file nsErrorService.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIERRORSERVICE nsErrorService::nsErrorService ( ) [inline]

Definition at line 63 of file nsErrorService.h.

{}
nsErrorService::~nsErrorService ( ) [inline, private]

Definition at line 69 of file nsErrorService.h.

{}

Member Function Documentation

NS_METHOD nsErrorService::Create ( nsISupports *  outer,
const nsIID aIID,
void **  aInstancePtr 
) [static]

Definition at line 97 of file nsErrorService.cpp.

{
    NS_ENSURE_NO_AGGREGATION(outer);
    nsErrorService* serv = new nsErrorService();
    if (serv == nsnull)
        return NS_ERROR_OUT_OF_MEMORY;
    NS_ADDREF(serv);
    nsresult rv = serv->QueryInterface(aIID, aInstancePtr);
    NS_RELEASE(serv);
    return rv;
}

Here is the call graph for this function:

string nsIErrorService::getErrorStringBundle ( in short  errorModule) [inherited]

Retrieves a string bundle URL for an error module.

Retrieves a key in a string bundle for an nsresult error code.

If no key is registered for the specified nsresult's code (obtained with NS_ERROR_GET_CODE), then the stringified version of the nsresult code is returned.

void nsIErrorService::registerErrorStringBundle ( in short  errorModule,
in string  stringBundleURL 
) [inherited]

Registers a string bundle URL for an error module.

Error modules are obtained from nsresult code with NS_ERROR_GET_MODULE.

void nsIErrorService::registerErrorStringBundleKey ( in nsresult  error,
in string  stringBundleKey 
) [inherited]

Registers a key in a string bundle for an nsresult error code.

Only the code portion of the nsresult is used (obtained with NS_ERROR_GET_CODE) in this registration. The string bundle key is used to look up internationalized messages in the string bundle.

void nsIErrorService::unregisterErrorStringBundle ( in short  errorModule) [inherited]

Registers a string bundle URL for an error module.

Unregisters a key in a string bundle for an nsresult error code.


Member Data Documentation

Definition at line 73 of file nsErrorService.h.

Definition at line 72 of file nsErrorService.h.


The documentation for this class was generated from the following files: