
I have been trying to improve error messages from wrapping functions using John Maddock's math functions. His error handling allows excellent messages from the function chisqr, including the 'offending' argument value(s), but I am unclear at part of the messages from Boost.test. The whole test output is: Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_chisqr.exe" Running 1 test case... unknown location(0): fatal error in "test_main_caller( argc, argv )": std::domain_error: Error in function float __cdecl boost::math::chisqr<float,float>(float,float): chisqr argument is -2, but must be > 0! ..\..\..\..\..\..\boost-sandbox\libs\math_functions\test\test_chisqr.cpp(119 ): last checkpoint *** 1 failure detected in test suite "Test Program" Project : error PRJ0019: A tool returned an error code from "Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_chisqr.exe"" Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\test_chisqr.exe" comes from the IDE (post-build event description field). Running 1 test case... is the start from test. std::domain_error: Error in function float __cdecl boost::math::chisqr<float,float>(float,float): chisqr argument is -2, but must be > 0! is the error message output from chisqr function, (BTW any comments on the formatting of this message: "chisqr argument is -2, but must be > 0!") But why does the test suite then output: unknown location(0) unknown location(0): fatal error in "test_main_caller( argc, argv )": This also shows in the example \boost\libs\test\example\unit_test_example_02.cpp output is // reports 'unknown location(0): fatal error in "free_test_function": memory access violation // d:\source code\boost\libs\test\example\unit_test_example_02.cpp(25): last checkpoint' Could/should it show file and line here? Am I using this wrongly? Or is this just a feature? ..\..\..\..\..\..\boost-sandbox\libs\math_functions\test\test_chisqr.cpp(119 ): last checkpoint Does show the (deliberately) offending file and line, which is good. Comments/suggestions? Paul --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com