aboutsummaryrefslogtreecommitdiffstats
path: root/brillo/errors/error_codes.h
diff options
context:
space:
mode:
Diffstat (limited to 'brillo/errors/error_codes.h')
-rw-r--r--brillo/errors/error_codes.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/brillo/errors/error_codes.h b/brillo/errors/error_codes.h
new file mode 100644
index 0000000..0189e00
--- /dev/null
+++ b/brillo/errors/error_codes.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef LIBCHROMEOS_BRILLO_ERRORS_ERROR_CODES_H_
+#define LIBCHROMEOS_BRILLO_ERRORS_ERROR_CODES_H_
+
+#include <string>
+
+#include <brillo/brillo_export.h>
+#include <brillo/errors/error.h>
+
+namespace brillo {
+namespace errors {
+
+namespace dbus {
+BRILLO_EXPORT extern const char kDomain[];
+} // namespace dbus
+
+namespace json {
+BRILLO_EXPORT extern const char kDomain[];
+BRILLO_EXPORT extern const char kParseError[];
+BRILLO_EXPORT extern const char kObjectExpected[];
+} // namespace json
+
+namespace http {
+BRILLO_EXPORT extern const char kDomain[];
+} // namespace http
+
+namespace system {
+BRILLO_EXPORT extern const char kDomain[];
+
+// Adds an Error object to the error chain identified by |error|, using
+// the system error code (see "errno").
+BRILLO_EXPORT void AddSystemError(ErrorPtr* error,
+ const tracked_objects::Location& location,
+ int errnum);
+} // namespace system
+
+} // namespace errors
+} // namespace brillo
+
+#endif // LIBCHROMEOS_BRILLO_ERRORS_ERROR_CODES_H_