|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2007-06-22 12:57:59
On Fri, June 22, 2007 18:12, Hartmut Kaiser wrote:
[...]
>
>>wave t.cpp
> t.cpp:8:1: error: ill formed preprocessor directive: #endif SOME_GUARD
> t.cpp:9:1: error: detected at least one missing #endif directive
>
> So the bottomline is: it works for me(tm) :-P
>
> What version of Wave are you using, what platform/compiler? Do you have a
> small test reproducing your problem?
>
> Regards Hartmut
>
Harmut,
thanks for the answer. I use VC Express 8.0 with boost 1.34, wave comes from the release as well.
May be the problem is on my side. My main looks like:
int main(int argc, char* argv[])
{
try
{
cmd_processor cmd(argc, argv);
cmd.process();
}
catch(std::exception const& e)
{
std::cerr << e.what() << nl << nl;
return 2;
}
catch(...)
{
std::cerr << "Unknown exception occured..." << std::endl;
return 3;
}
return 0;
}
After the snippet specified I come into the case with std::execption and e.what() returns
boost::wave::preprocessor.
Debugging through what()... I came into the class preprocess_exception and found additional
methods, which give me more info. Unfortunately, I rely on the standard (std::exception) interface
and don't like the idea of writing hundres of 'if's or 'else if's or doing many 'dynamic_cast's to
distinguish exceptions. I believe that every exception should give me enough description by
calling the what function. May be this is stupid... ;)
Would like to hear your statement.
Many thanks!
Ovanes
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