You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by th...@apache.org on 2018/10/02 17:29:20 UTC
[avro] branch AVRO-2186-wrong-error-message updated: Fixed error
message in validating encoder/decoder and resolving decoder
This is an automated email from the ASF dual-hosted git repository.
thiru pushed a commit to branch AVRO-2186-wrong-error-message
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/AVRO-2186-wrong-error-message by this push:
new 993cede Fixed error message in validating encoder/decoder and resolving decoder
993cede is described below
commit 993cedea14eb511e6341e1ed2692112bd253e3d3
Author: Thiruvalluvan M G <th...@startsmartlabs.com>
AuthorDate: Tue Oct 2 22:59:07 2018 +0530
Fixed error message in validating encoder/decoder and resolving decoder
---
lang/c++/impl/parsing/Symbol.hh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lang/c++/impl/parsing/Symbol.hh b/lang/c++/impl/parsing/Symbol.hh
index 2911752..57e2618 100644
--- a/lang/c++/impl/parsing/Symbol.hh
+++ b/lang/c++/impl/parsing/Symbol.hh
@@ -381,19 +381,19 @@ class SimpleParser {
Handler& handler_;
std::stack<Symbol> parsingStack;
- static void throwMismatch(Symbol::Kind expected, Symbol::Kind actual)
+ static void throwMismatch(Symbol::Kind actual, Symbol::Kind expected)
{
std::ostringstream oss;
- oss << "Invalid operation. Expected: " <<
- Symbol::toString(expected) << " got " <<
+ oss << "Invalid operation. Schema requires: " <<
+ Symbol::toString(expected) << ", got: " <<
Symbol::toString(actual);
throw Exception(oss.str());
}
- static void assertMatch(Symbol::Kind expected, Symbol::Kind actual)
+ static void assertMatch(Symbol::Kind actual, Symbol::Kind expected)
{
if (expected != actual) {
- throwMismatch(expected, actual);
+ throwMismatch(actual, expected);
}
}