
16 Apr
2010
16 Apr
'10
12:24 p.m.
Hi all, someone can explain to me how to use, if it's possible, on_error error handler? I'd like to throw an exception reporting error data, because I'm using spirit in a Qt-based application, and my idea is to catch exception on upper level to pop-up a messagebox or something like that. I start from documentation example, here: on_error<fail> ( xml , std::cout << val("Error! Expecting ") << _4 // what failed? << val(" here: \"") << constructstd::string(_3, _2) // iterators to error-pos, end << val("\"") << std::endl ); Trying several possible solution, no one compiles fine. I don't know, really, what I have to do, so please help me!! :-) Thanks in advance, Michele