@@ -154,9 +154,9 @@ namespace adaptor {
154154template <typename T>
155155struct convert <msgpack::type::array_ref<T> > {
156156 msgpack::object const & operator ()(msgpack::object const & o, msgpack::type::array_ref<T>& v) const {
157- if (!v.data ) { throw msgpack::type_error (); }
158- if (o.type != msgpack::type::ARRAY) { throw msgpack::type_error (); }
159- if (v.size () < o.via .bin .size ) { throw msgpack::type_error (); }
157+ if (!v.data ) { THROW msgpack::type_error (); }
158+ if (o.type != msgpack::type::ARRAY) { THROW msgpack::type_error (); }
159+ if (v.size () < o.via .bin .size ) { THROW msgpack::type_error (); }
160160 if (o.via .array .size > 0 ) {
161161 msgpack::object* p = o.via .array .ptr ;
162162 msgpack::object* const pend = o.via .array .ptr + o.via .array .size ;
@@ -174,9 +174,9 @@ struct convert<msgpack::type::array_ref<T> > {
174174template <typename T, std::size_t N>
175175struct convert <msgpack::type::array_ref<T[N]> > {
176176 msgpack::object const & operator ()(msgpack::object const & o, msgpack::type::array_ref<T[N]>& v) const {
177- if (!v.data ) { throw msgpack::type_error (); }
178- if (o.type != msgpack::type::ARRAY) { throw msgpack::type_error (); }
179- if (v.size () < o.via .bin .size ) { throw msgpack::type_error (); }
177+ if (!v.data ) { THROW msgpack::type_error (); }
178+ if (o.type != msgpack::type::ARRAY) { THROW msgpack::type_error (); }
179+ if (v.size () < o.via .bin .size ) { THROW msgpack::type_error (); }
180180 if (o.via .array .size > 0 ) {
181181 msgpack::object* p = o.via .array .ptr ;
182182 msgpack::object* const pend = o.via .array .ptr + o.via .array .size ;
@@ -194,8 +194,8 @@ struct convert<msgpack::type::array_ref<T[N]> > {
194194template <typename T>
195195struct convert <msgpack::type::array_ref<std::vector<T> > > {
196196 msgpack::object const & operator ()(msgpack::object const & o, msgpack::type::array_ref<std::vector<T> >& v) const {
197- if (!v.data ) { throw msgpack::type_error (); }
198- if (o.type != msgpack::type::ARRAY) { throw msgpack::type_error (); }
197+ if (!v.data ) { THROW msgpack::type_error (); }
198+ if (o.type != msgpack::type::ARRAY) { THROW msgpack::type_error (); }
199199 v.data ->resize (o.via .bin .size );
200200 if (o.via .array .size > 0 ) {
201201 msgpack::object* p = o.via .array .ptr ;
@@ -215,7 +215,7 @@ template <typename T>
215215struct pack <msgpack::type::array_ref<T> > {
216216 template <typename Stream>
217217 msgpack::packer<Stream>& operator ()(msgpack::packer<Stream>& o, const msgpack::type::array_ref<T>& v) const {
218- if (!v.data ) { throw msgpack::type_error (); }
218+ if (!v.data ) { THROW msgpack::type_error (); }
219219 uint32_t size = checked_get_container_size (v.size ());
220220 o.pack_array (size);
221221 for (typename T::const_iterator it (v.data ->begin ()), it_end (v.data ->end ());
@@ -230,7 +230,7 @@ template <typename T, std::size_t N>
230230struct pack <msgpack::type::array_ref<T[N]> > {
231231 template <typename Stream>
232232 msgpack::packer<Stream>& operator ()(msgpack::packer<Stream>& o, const msgpack::type::array_ref<T[N]>& v) const {
233- if (!v.data ) { throw msgpack::type_error (); }
233+ if (!v.data ) { THROW msgpack::type_error (); }
234234 uint32_t size = checked_get_container_size (v.size ());
235235 o.pack_array (size);
236236 for (T const * it = v.data ;
@@ -244,7 +244,7 @@ struct pack<msgpack::type::array_ref<T[N]> > {
244244template <typename T>
245245struct object_with_zone <msgpack::type::array_ref<T> > {
246246 void operator ()(msgpack::object::with_zone& o, const msgpack::type::array_ref<T>& v) const {
247- if (!v.data ) { throw msgpack::type_error (); }
247+ if (!v.data ) { THROW msgpack::type_error (); }
248248 o.type = msgpack::type::ARRAY;
249249 if (v.data ->empty ()) {
250250 o.via .array .ptr = MSGPACK_NULLPTR;
@@ -277,7 +277,7 @@ struct object_with_zone<msgpack::type::array_ref<T> > {
277277template <typename T, std::size_t N>
278278struct object_with_zone <msgpack::type::array_ref<T[N]> > {
279279 void operator ()(msgpack::object::with_zone& o, const msgpack::type::array_ref<T[N]>& v) const {
280- if (!v.data ) { throw msgpack::type_error (); }
280+ if (!v.data ) { THROW msgpack::type_error (); }
281281 o.type = msgpack::type::ARRAY;
282282 uint32_t size = checked_get_container_size (v.size ());
283283 msgpack::object* p = static_cast <msgpack::object*>(o.zone .allocate_align (sizeof (msgpack::object)*size, MSGPACK_ZONE_ALIGNOF (msgpack::object)));
0 commit comments