diff options
author | Vincent Richard <[email protected]> | 2006-07-23 19:15:45 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-07-23 19:15:45 +0000 |
commit | 2a39997480fabba6618ef27b4e538d6cdfe5f7d4 (patch) | |
tree | 0b37eea7a3ab716493a27177d0c032bc6d6c43f9 /examples/example6.cpp | |
parent | Made 'string' constructor explicit to avoid misuse. (diff) | |
download | vmime-2a39997480fabba6618ef27b4e538d6cdfe5f7d4.tar.gz vmime-2a39997480fabba6618ef27b4e538d6cdfe5f7d4.zip |
Added exception handling code for 'invalid_response'.
Diffstat (limited to 'examples/example6.cpp')
-rw-r--r-- | examples/example6.cpp | 8 |
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 = |