diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-07-01 12:20:24 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-07-01 12:20:24 +0200 |
commit | cc92e6fa0095df2e8244ee6fe247eea049eb3443 (patch) | |
tree | 0e3f0ceed5b2b93a56aa0a7086883c6d947ba306 | |
parent | 9d237c68b7ce6cdefc645daad5fa1fc57a2d80be (diff) |
c++,codec-json: Changed to more appropriate error
-rw-r--r-- | src/codec-json/json.tmpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codec-json/json.tmpl.h b/src/codec-json/json.tmpl.h index 2bbfa5d..4b3a1a2 100644 --- a/src/codec-json/json.tmpl.h +++ b/src/codec-json/json.tmpl.h @@ -483,7 +483,7 @@ struct json_decode<schema::Struct<schema::Member<T,Lits>...>, RootSchema, ToDeco constexpr static string_literal Literal = parameter_key_pack_type<i, Lits...>::literal; if(search_name == Literal.view()){ if(fields[i]){ - return make_error<err::already_exists>(); + return make_error<err::invalid_state>(); } fields[i] = true; auto eov = json_decode<Type, RootSchema, ToDecode>::decode(buff, to.template get<Literal>()); |