Bug 1918529 - fix some subpixel misalignment issues with gfx.webrender.svg-filter...
[gecko.git] / xpcom / base / ErrorNames.h
blobd209cc492bafbf8293ed28704047af27c7e0c17a
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_ErrorNames_h
8 #define mozilla_ErrorNames_h
10 #include "nsError.h"
11 #include "nsStringFwd.h"
13 namespace mozilla {
15 // Maps the given nsresult to its symbolic name. For example,
16 // GetErrorName(NS_OK, name) will result in name == "NS_OK".
17 // When the symbolic name is unknown, name will be of the form
18 // "NS_ERROR_GENERATE_SUCCESS(<module>, <code>)" or
19 // "NS_ERROR_GENERATE_FAILURE(<module>, <code>)".
20 void GetErrorName(nsresult rv, nsACString& name);
22 // Same as GetErrorName, except that only nsresult values with statically
23 // known symbolic names are handled. For all other values, nullptr is
24 // returned.
25 const char* GetStaticErrorName(nsresult rv);
27 } // namespace mozilla
29 #endif // mozilla_ErrorNames_h