exceptions: remove duplicate marshal_exception
There are both marshal_exception (defined in types.hh) and exceptions::marshal_exception (defined ini exceptions/exceptions.hh). The latter is never thrown by anything but caught in few places which obviously is incorrect. Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
try {
|
||||
data_type_for<int64_t>()->validate(*tval);
|
||||
} catch (exceptions::marshal_exception e) {
|
||||
} catch (marshal_exception e) {
|
||||
throw exceptions::invalid_request_exception("Invalid timestamp value");
|
||||
}
|
||||
return boost::any_cast<int64_t>(data_type_for<int64_t>()->deserialize(*tval));
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
try {
|
||||
data_type_for<int32_t>()->validate(*tval);
|
||||
}
|
||||
catch (exceptions::marshal_exception e) {
|
||||
catch (marshal_exception e) {
|
||||
throw exceptions::invalid_request_exception("Invalid TTL value");
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ constants::literal::parsed_value(data_type validator)
|
||||
return long_type->from_string(_text);
|
||||
}
|
||||
return validator->from_string(_text);
|
||||
} catch (const exceptions::marshal_exception& e) {
|
||||
} catch (const marshal_exception& e) {
|
||||
throw exceptions::invalid_request_exception(e.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
_receiver->type->validate(value.value());
|
||||
}
|
||||
return value;
|
||||
} catch (const exceptions::marshal_exception& e) {
|
||||
} catch (const marshal_exception& e) {
|
||||
throw exceptions::invalid_request_exception(e.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,13 +46,6 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class marshal_exception : public std::logic_error {
|
||||
public:
|
||||
marshal_exception(std::string cause)
|
||||
: logic_error(cause)
|
||||
{ }
|
||||
};
|
||||
|
||||
enum class exception_code : int32_t {
|
||||
SERVER_ERROR = 0x0000,
|
||||
PROTOCOL_ERROR = 0x000A,
|
||||
|
||||
Reference in New Issue
Block a user