aboutsummaryrefslogtreecommitdiffstats
path: root/brillo/errors/error_codes.h
blob: 0189e00903bb7230f2f12d3b77b52f1045938550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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_