From 7aebeeb2e2ad13c89c202d0bfa8c634ab27b91b4 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sat, 23 Nov 2013 09:25:38 +0100 Subject: Do not throw exception for normal code flow (exceptions::no_such_parameter). --- src/plainTextPart.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/plainTextPart.cpp') diff --git a/src/plainTextPart.cpp b/src/plainTextPart.cpp index bdb76c4d..7a1542d7 100644 --- a/src/plainTextPart.cpp +++ b/src/plainTextPart.cpp @@ -78,21 +78,10 @@ void plainTextPart::parse(shared_ptr /* message */, shared_ptr ctf = textPart->getHeader()->findField (fields::CONTENT_TYPE); - if (ctf) - { - try - { - m_charset = ctf->getCharset(); - } - catch (exceptions::no_such_parameter&) - { - // No "charset" parameter. - } - } + if (ctf && ctf->hasCharset()) + m_charset = ctf->getCharset(); else - { - // No "Content-type" field. - } + m_charset = charset(); } -- cgit v1.2.3