diff options
author | Vincent Richard <[email protected]> | 2013-02-27 13:59:37 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-02-27 13:59:37 +0000 |
commit | 8378b350dfc612673d1ba3597e9d5bb1347ae944 (patch) | |
tree | 64212cb2e9e70c23ec25fa209ba1bb15a064067d /src/exception.cpp | |
parent | Fixed wrong function called. (diff) | |
download | vmime-8378b350dfc612673d1ba3597e9d5bb1347ae944.tar.gz vmime-8378b350dfc612673d1ba3597e9d5bb1347ae944.zip |
Throw exception when an invalid value type is set in a header field.
Diffstat (limited to 'src/exception.cpp')
-rw-r--r-- | src/exception.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/exception.cpp b/src/exception.cpp index 85f1f4f3..a341c161 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -94,15 +94,15 @@ namespace exceptions // -// bad_field_type +// bad_field_value_type // -bad_field_type::~bad_field_type() throw() {} -bad_field_type::bad_field_type(const exception& other) - : exception("Bad field type.", other) {} +bad_field_value_type::~bad_field_value_type() throw() {} +bad_field_value_type::bad_field_value_type(const string& fieldName, const exception& other) + : exception("Bad value type for field '" + fieldName + "'.", other) {} -exception* bad_field_type::clone() const { return new bad_field_type(*this); } -const char* bad_field_type::name() const throw() { return "bad_field_type"; } +exception* bad_field_value_type::clone() const { return new bad_field_value_type(*this); } +const char* bad_field_value_type::name() const throw() { return "bad_field_value_type"; } |