Lines Matching refs:Error
17 #include "shill/error.h"
25 #include <brillo/errors/error.h>
35 const Error::Info Error::kInfos[kNumErrors] = {
36 { kErrorResultSuccess, "Success (no error)" },
42 { kErrorResultInternalError, "Internal error" },
65 Error::Error() {
69 Error::Error(Type type) {
73 Error::Error(Type type, const string& message) {
77 Error::~Error() {}
79 void Error::Populate(Type type) {
83 void Error::Populate(Type type, const string& message) {
84 CHECK(type < kNumErrors) << "Error type out of range: " << type;
89 void Error::Populate(Type type,
92 CHECK(type < kNumErrors) << "Error type out of range: " << type;
98 void Error::Reset() {
102 void Error::CopyFrom(const Error& error) {
103 Populate(error.type_, error.message_);
106 bool Error::ToChromeosError(brillo::ErrorPtr* error) const {
108 brillo::Error::AddTo(error,
119 string Error::GetDBusResult(Type type) {
120 CHECK(type < kNumErrors) << "Error type out of range: " << type;
125 string Error::GetDefaultMessage(Type type) {
126 CHECK(type < kNumErrors) << "Error type out of range: " << type;
131 void Error::PopulateAndLog(const tracked_objects::Location& from_here,
132 Error* error, Type type, const string& message) {
134 LOG(ERROR) << "[" << file_name << "("
136 if (error) {
137 error->Populate(type, message, from_here);
143 std::ostream& operator<<(std::ostream& stream, const shill::Error& error) {
144 stream << error.GetDBusResult(error.type()) << ": " << error.message();