From b5cff8cc5c72c8d895e97075c0ab0f223cd81b09 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Thu, 6 Aug 2015 10:27:06 +0200 Subject: Move input_error out from stream_reader --- src/tag_array.cpp | 8 ++++---- src/tag_list.cpp | 2 +- src/tag_primitive.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/tag_array.cpp b/src/tag_array.cpp index f521768dd5..94b8ffe7ac 100644 --- a/src/tag_array.cpp +++ b/src/tag_array.cpp @@ -108,12 +108,12 @@ void tag_array::read_payload(io::stream_reader& reader) int32_t length; reader.read_num(length); if(length < 0 || !reader.get_istr()) - throw io::stream_reader::input_error("Error reading length of tag_byte_array"); + throw io::input_error("Error reading length of tag_byte_array"); data.resize(length); reader.get_istr().read(reinterpret_cast(data.data()), length); if(!reader.get_istr()) - throw io::stream_reader::input_error("Error reading contents of tag_byte_array"); + throw io::input_error("Error reading contents of tag_byte_array"); } template<> @@ -122,7 +122,7 @@ void tag_array::read_payload(io::stream_reader& reader) int32_t length; reader.read_num(length); if(length < 0 || !reader.get_istr()) - throw io::stream_reader::input_error("Error reading length of tag_int_array"); + throw io::input_error("Error reading length of tag_int_array"); data.clear(); data.reserve(length); @@ -133,7 +133,7 @@ void tag_array::read_payload(io::stream_reader& reader) data.push_back(val); } if(!reader.get_istr()) - throw io::stream_reader::input_error("Error reading contents of tag_int_array"); + throw io::input_error("Error reading contents of tag_int_array"); } template diff --git a/src/tag_list.cpp b/src/tag_list.cpp index 3bcc42e8b6..53c1a8e392 100644 --- a/src/tag_list.cpp +++ b/src/tag_list.cpp @@ -139,7 +139,7 @@ void tag_list::read_payload(io::stream_reader& reader) int32_t length; reader.read_num(length); if(length < 0 || !reader.get_istr()) - throw io::stream_reader::input_error("Error reading length of tag_list"); + throw io::input_error("Error reading length of tag_list"); if(lt != tag_type::End) { diff --git a/src/tag_primitive.cpp b/src/tag_primitive.cpp index 15fc87d752..358d946e6a 100644 --- a/src/tag_primitive.cpp +++ b/src/tag_primitive.cpp @@ -72,7 +72,7 @@ void tag_primitive::read_payload(io::stream_reader& reader) { std::ostringstream str; str << "Error reading " << type; - throw io::stream_reader::input_error(str.str()); + throw io::input_error(str.str()); } } -- cgit 0.0.5-2-1-g0f52