|
|
@ -129,9 +129,9 @@ class StatusErrorListener : public converter::ErrorListener { |
|
|
|
|
|
|
|
|
|
|
|
util::Status GetStatus() { return status_; } |
|
|
|
util::Status GetStatus() { return status_; } |
|
|
|
|
|
|
|
|
|
|
|
virtual void InvalidName(const converter::LocationTrackerInterface& loc, |
|
|
|
void InvalidName(const converter::LocationTrackerInterface& loc, |
|
|
|
StringPiece unknown_name, |
|
|
|
StringPiece unknown_name, |
|
|
|
StringPiece message) { |
|
|
|
StringPiece message) override { |
|
|
|
string loc_string = GetLocString(loc); |
|
|
|
string loc_string = GetLocString(loc); |
|
|
|
if (!loc_string.empty()) { |
|
|
|
if (!loc_string.empty()) { |
|
|
|
loc_string.append(" "); |
|
|
|
loc_string.append(" "); |
|
|
@ -141,17 +141,17 @@ class StatusErrorListener : public converter::ErrorListener { |
|
|
|
StrCat(loc_string, unknown_name, ": ", message)); |
|
|
|
StrCat(loc_string, unknown_name, ": ", message)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
virtual void InvalidValue(const converter::LocationTrackerInterface& loc, |
|
|
|
void InvalidValue(const converter::LocationTrackerInterface& loc, |
|
|
|
StringPiece type_name, |
|
|
|
StringPiece type_name, |
|
|
|
StringPiece value) { |
|
|
|
StringPiece value) override { |
|
|
|
status_ = util::Status( |
|
|
|
status_ = util::Status( |
|
|
|
util::error::INVALID_ARGUMENT, |
|
|
|
util::error::INVALID_ARGUMENT, |
|
|
|
StrCat(GetLocString(loc), ": invalid value ", string(value), |
|
|
|
StrCat(GetLocString(loc), ": invalid value ", string(value), |
|
|
|
" for type ", string(type_name))); |
|
|
|
" for type ", string(type_name))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
virtual void MissingField(const converter::LocationTrackerInterface& loc, |
|
|
|
void MissingField(const converter::LocationTrackerInterface& loc, |
|
|
|
StringPiece missing_name) { |
|
|
|
StringPiece missing_name) override { |
|
|
|
status_ = util::Status(util::error::INVALID_ARGUMENT, |
|
|
|
status_ = util::Status(util::error::INVALID_ARGUMENT, |
|
|
|
StrCat(GetLocString(loc), ": missing field ", |
|
|
|
StrCat(GetLocString(loc), ": missing field ", |
|
|
|
string(missing_name))); |
|
|
|
string(missing_name))); |
|
|
|