|
Boost Users : |
Subject: [Boost-users] boost::get_error_info not found!?
From: Germán Diago (germandiago_at_[hidden])
Date: 2011-05-12 11:36:04
Hello. I have this code and I can't find out why it won't compile. I have
looked at it several times and I can't find the reason.
My definitions:
enum ErrorCode { Success, BadOptions = -1, CannotConnect = -3 };
class ConsoleException : virtual public boost::exception, virtual
public std::exception {};
namespace ExceptionTags {
struct ErrorCodeTag {};
}
My throw:
BOOST_THROW_EXCEPTION(CabConsoleException() << ErrorCodeInfo(BadOptions));
And in main:
try {
CabConsole2 console;
console.run(argc, argv);
}
catch (boost::exception & ce) {
return 0;
return *(boost::get_error_info<ExceptionTags::ErrorCodeTag>(ce));
}
I'm using boost version 1.42. Thanks in advance.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net