Re: Error messages returned by quantlib exceptions
Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Error-messages-returned-by-quantlib-exceptions-tp3921p3922.html
On 07/12/2005 06:48:37 PM, Luca Berardi wrote:
> I recently moved from Visual C++ 6.0 to Visual C++ 7.1 (.Net 2003). I
> noticed that error messages returned by quantlib exceptions (namely
> by means of the macros QL_REQUIRE and QL_FAIL), in addition to the
> string set by the user, have a very long prefix and sometimes are
> truncated.
> Is it possible to restore the old format, i.e. the one with only the
> error message set by the user (and maybe the source file with the
> line number too)?
Yes. You have to edit errors.cpp and remove from the two
implementations of the format() function the lines:
if (function != "(unknown)")
msg << function << ": ";
I'll try and provide a configuration option in next release.
Later,
Luigi
----------------------------------------
standards, n.:
The principles we use to reject other people's code.