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 <base/location.h> 11 #include <brillo/brillo_export.h> 12 #include <brillo/errors/error.h> 13 14 namespace brillo { 15 namespace errors { 16 17 namespace dbus { 18 BRILLO_EXPORT extern const char kDomain[]; 19 } // namespace dbus 20 21 namespace json { 22 BRILLO_EXPORT extern const char kDomain[]; 23 BRILLO_EXPORT extern const char kParseError[]; 24 BRILLO_EXPORT extern const char kObjectExpected[]; 25 } // namespace json 26 27 namespace http { 28 BRILLO_EXPORT extern const char kDomain[]; 29 } // namespace http 30 31 namespace system { 32 BRILLO_EXPORT extern const char kDomain[]; 33 34 // Adds an Error object to the error chain identified by |error|, using 35 // the system error code (see "errno"). 36 BRILLO_EXPORT void AddSystemError(ErrorPtr* error, 37 const base::Location& location, 38 int errnum); 39 } // namespace system 40 41 } // namespace errors 42 } // namespace brillo 43 44 #endif // LIBBRILLO_BRILLO_ERRORS_ERROR_CODES_H_ 45