diff --git a/src/torrent/object_raw_bencode.h b/src/torrent/object_raw_bencode.h index 5e82fff8..4f49386a 100644 --- a/src/torrent/object_raw_bencode.h +++ b/src/torrent/object_raw_bencode.h @@ -156,7 +156,7 @@ public: inline std::string raw_bencode::as_value_string() const { if (!is_value()) - throw bencode_error("Wrong object type."); + throw bencode_error("Wrong object type - not a value."); return std::string(data() + 1, size() - 2); } @@ -164,7 +164,7 @@ raw_bencode::as_value_string() const { inline raw_string raw_bencode::as_raw_string() const { if (!is_raw_string()) - throw bencode_error("Wrong object type."); + throw bencode_error("Wrong object type - not a raw string."); const_iterator itr = std::find(begin(), end(), ':'); @@ -177,7 +177,7 @@ raw_bencode::as_raw_string() const { inline raw_list raw_bencode::as_raw_list() const { if (!is_raw_list()) - throw bencode_error("Wrong object type."); + throw bencode_error("Wrong object type - not a raw list."); return raw_list(m_data + 1, m_size - 2); } @@ -185,7 +185,7 @@ raw_bencode::as_raw_list() const { inline raw_map raw_bencode::as_raw_map() const { if (!is_raw_map()) - throw bencode_error("Wrong object type."); + throw bencode_error("Wrong object type - not a raw map."); return raw_map(m_data + 1, m_size - 2); }