diff options
author | Vincent Richard <[email protected]> | 2013-11-23 08:25:38 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-23 08:25:38 +0000 |
commit | 7aebeeb2e2ad13c89c202d0bfa8c634ab27b91b4 (patch) | |
tree | 591c6558daf2773bb0ce913e39189b295d9406c9 /src/htmlTextPart.cpp | |
parent | Do not throw exception for normal code flow (exceptions::no_such_field). (diff) | |
download | vmime-7aebeeb2e2ad13c89c202d0bfa8c634ab27b91b4.tar.gz vmime-7aebeeb2e2ad13c89c202d0bfa8c634ab27b91b4.zip |
Do not throw exception for normal code flow (exceptions::no_such_parameter).
Diffstat (limited to 'src/htmlTextPart.cpp')
-rw-r--r-- | src/htmlTextPart.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
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 <const bodyPart> message, shared_ptr <const shared_ptr <const contentTypeField> ctf = textPart->getHeader()->findField <contentTypeField>(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. |