1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
9 * nsIErrorService: This is an interim service that allows nsresult codes to be mapped to
10 * string bundles that can be used to look up error messages. String bundle keys can also
13 * This service will eventually get replaced by extending xpidl to allow errors to be defined.
14 * (http://bugzilla.mozilla.org/show_bug.cgi?id=13423).
16 [scriptable
, uuid(afe1f190
-a3c2
-11e3
-a5e2
-0800200c9a66
)]
17 interface nsIErrorService
: nsISupports
20 * Registers a string bundle URL for an error module. Error modules are obtained from
21 * nsresult code with NS_ERROR_GET_MODULE.
23 void registerErrorStringBundle
(in short errorModule
, in string stringBundleURL
);
26 * Unregisters a string bundle URL for an error module.
28 void unregisterErrorStringBundle
(in short errorModule
);
31 * Retrieves a string bundle URL for an error module.
33 string getErrorStringBundle
(in short errorModule
);
38 // The global nsIErrorService:
39 #define NS_ERRORSERVICE_NAME
"Error Service"
40 #define NS_ERRORSERVICE_CONTRACTID
"@mozilla.org/xpcom/error-service;1"
41 #define NS_ERRORSERVICE_CID \
42 { /* 744afd5e-5f8c-11d4-9877-00c04fa0cf4a */ \
46 {0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a} \