几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】error descriptions (http://www.dimcax.com/hust/showthread.php?t=16081)

yang686526 2009-05-05 09:35 AM

【转帖】error descriptions
 
error descriptions
error descriptions
hi,
i can't seem to be able to get hold of the string describing an error when it is thrown. my code is:
catch (const oderror& e)
{
odstring s = e.description();
showerrorstr(s, e.code()); // routine coded elsewhere
return false;
}
if i put a breakpoint on the call to showerrorstr, the odstring s is always empty (the error code in this particular case was einvalidinput). what have i done wrong? i am using v2.0.3 of the libraries.
thanks in advance,
ali smith
set a breakpoint in exsystemservices::formatmessage if you are using our exsystemservices class, or in your formatmessage overload in your systemservices class, and see what's get formatted for einvalidinput.
vladimir
hi, that pointed me at the problem - i'd commented out the formatmessage function contents, to get round a build issue, and forgotten to put the code back in! thanks for the help.


所有的时间均为北京时间。 现在的时间是 09:56 AM.