aboutsummaryrefslogtreecommitdiffstats
path: root/examples/example6.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2006-07-23 19:15:45 +0000
committerVincent Richard <[email protected]>2006-07-23 19:15:45 +0000
commit2a39997480fabba6618ef27b4e538d6cdfe5f7d4 (patch)
tree0b37eea7a3ab716493a27177d0c032bc6d6c43f9 /examples/example6.cpp
parentMade 'string' constructor explicit to avoid misuse. (diff)
downloadvmime-2a39997480fabba6618ef27b4e538d6cdfe5f7d4.tar.gz
vmime-2a39997480fabba6618ef27b4e538d6cdfe5f7d4.zip
Added exception handling code for 'invalid_response'.
Diffstat (limited to 'examples/example6.cpp')
-rw-r--r--examples/example6.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/example6.cpp b/examples/example6.cpp
index 6ce14a41..2783996a 100644
--- a/examples/example6.cpp
+++ b/examples/example6.cpp
@@ -244,6 +244,14 @@ static std::ostream& operator<<(std::ostream& os, const vmime::exception& e)
os << " response = " << cee.response() << std::endl;
}
+ if (dynamic_cast <const vmime::exceptions::invalid_response*>(&e))
+ {
+ const vmime::exceptions::invalid_response& ir =
+ dynamic_cast <const vmime::exceptions::invalid_response&>(e);
+
+ os << " response = " << ir.response() << std::endl;
+ }
+
if (dynamic_cast <const vmime::exceptions::connection_greeting_error*>(&e))
{
const vmime::exceptions::connection_greeting_error& cgee =