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/htmlTextPart.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/htmlTextPart.cpp') diff --git a/src/htmlTextPart.cpp b/src/htmlTextPart.cpp index e97161cb..680d3955 100644 --- a/src/htmlTextPart.cpp +++ b/src/htmlTextPart.cpp @@ -198,21 +198,10 @@ void htmlTextPart::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(); // Extract embedded objects. The algorithm is quite simple: for each previously // found inline part, we check if its CID/Location is contained in the HTML text. -- cgit v1.2.3