From 2a39997480fabba6618ef27b4e538d6cdfe5f7d4 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 23 Jul 2006 19:15:45 +0000 Subject: [PATCH] Added exception handling code for 'invalid_response'. --- examples/example6.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 (&e)) + { + const vmime::exceptions::invalid_response& ir = + dynamic_cast (e); + + os << " response = " << ir.response() << std::endl; + } + if (dynamic_cast (&e)) { const vmime::exceptions::connection_greeting_error& cgee =