|
Boost : |
From: Tom Brinkman (reportbase_at_[hidden])
Date: 2007-10-03 10:53:26
>> typedef tags<tag_file_name,tag_open_mode,tag_errno> file_err;
>> throw my_error() << file_err(name,mode,errno);
Looks good.
I wonder why my_error() is required. I wonder if a globaly
static object, such as "boost::exception()" might be even cleaner
and more lightweight. This would allow us to rewrite the throw statement like
the following:
try
{
throw boost::exception() << file_err(name,mode,errno);
}
catch(boost::exception& e)
{
std::cerr << e;
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk