Boost logo

Boost :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2007-10-02 14:26:39


On 9/30/07, Tom Brinkman <reportbase_at_[hidden]> wrote:
> > 3) Support for linking multiple error tags in a single expression
> > might be useful and help in standarizing errors throughout an application.
> >
> > throw boost:::exception() <<
> > boost::error_info<tag_errorno,tag_filename,tag_size,tag_width>(
> > (1,"output.txt",100,200);
>
> >> Could you clarify what you mean?
>
> Well, I could do something like this:
>
> typedef boost::error_info<tag_errorno,
> tag_filename,tag_size,tag_width> error_t;
>
> throw error_t(1,"output.txt",100,200);
>
> If this error was common throughtout an application, this
> typedef would make the code more readable.

Tom, I need some more help in understanding what you are proposing.

What exactly is error_t? It is confusing because the way you use it
above, it appears that it's an exception type. At the same time, it
makes reference to boost::error_info, which is _not_ an exception type
(in the current definition of Boost Exception, error_info it is not
something you throw.)

Emil Dotchevski


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk