1 // Copyright 2014 The Chromium OS Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_ 6 #define LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_ 7 8 #include <string> 9 10 #include <brillo/brillo_export.h> 11 #include <brillo/errors/error.h> 12 13 namespace brillo { 14 namespace errors { 15 16 namespace dbus { 17 BRILLO_EXPORT extern const char kDomain[]; 18 } // namespace dbus 19 20 namespace json { 21 BRILLO_EXPORT extern const char kDomain[]; 22 BRILLO_EXPORT extern const char kParseError[]; 23 BRILLO_EXPORT extern const char kObjectExpected[]; 24 } // namespace json 25 26 namespace http { 27 BRILLO_EXPORT extern const char kDomain[]; 28 } // namespace http 29 30 namespace system { 31 BRILLO_EXPORT extern const char kDomain[]; 32 33 // Adds an Error object to the error chain identified by |error|, using 34 // the system error code (see "errno"). 35 BRILLO_EXPORT void AddSystemError(ErrorPtr* error, 36 const tracked_objects::Location& location, 37 int errnum); 38 } // namespace system 39 40 } // namespace errors 41 } // namespace brillo 42 43 #endif // LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_ 44