From ad5da7f1318cd2fa9d57de7033595206b779ff44 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Wed, 11 Mar 2015 10:35:23 +0900 Subject: [PATCH] Added msgpack prefix to erb template files. The files that are generated by preprocess have already have the prefix. --- erb/cpp03_define.hpp.erb | 4 ++-- erb/cpp03_msgpack_tuple.hpp.erb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erb/cpp03_define.hpp.erb b/erb/cpp03_define.hpp.erb index e2f945b9..df677763 100644 --- a/erb/cpp03_define.hpp.erb +++ b/erb/cpp03_define.hpp.erb @@ -90,7 +90,7 @@ struct define<> { } void msgpack_unpack(msgpack::object const& o) { - if(o.type != msgpack::type::ARRAY) { throw type_error(); } + if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); } } void msgpack_object(msgpack::object* o, msgpack::zone&) const { @@ -115,7 +115,7 @@ struct define, A<%=j%><%}%>> { } void msgpack_unpack(msgpack::object const& o) { - if(o.type != msgpack::type::ARRAY) { throw type_error(); } + if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); } const size_t size = o.via.array.size; if(size > 0) { msgpack::object *ptr = o.via.array.ptr; diff --git a/erb/cpp03_msgpack_tuple.hpp.erb b/erb/cpp03_msgpack_tuple.hpp.erb index e7752a5c..63e6c54d 100644 --- a/erb/cpp03_msgpack_tuple.hpp.erb +++ b/erb/cpp03_msgpack_tuple.hpp.erb @@ -139,7 +139,7 @@ inline tuple, A<%=j%><%}%>> make_tuple(typename tuple_type< inline msgpack::object const& operator>> ( msgpack::object const& o, type::tuple<>&) { - if(o.type != msgpack::type::ARRAY) { throw type_error(); } + if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); } return o; } <%0.upto(GENERATION_LIMIT) {|i|%> @@ -147,8 +147,8 @@ template , typename A<%=j%><%}%>> inline msgpack::object const& operator>> ( msgpack::object const& o, type::tuple, A<%=j%><%}%>>& v) { - if(o.type != msgpack::type::ARRAY) { throw type_error(); } - if(o.via.array.size < <%=i+1%>) { throw type_error(); } + if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); } + if(o.via.array.size < <%=i+1%>) { throw msgpack::type_error(); } <%0.upto(i) {|j|%> o.via.array.ptr[<%=j%>].convert>::type>(v.template get<<%=j%>>());<%}%> return o;