mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031731: Draw Harness - colorize errors and exception messages
Draw_Interpretor, CommandCmd() - catched exceptions and messages put into Tcl string result before throwing a Tcl exception (return 1) are now print in intense red (using Message::SendFail()). Duplication of exception message in std::cout and Tcl output has been removed. Draw Harness plugins have been updated to use either Message::SendFail() or theDI instead of std::cout/std::cerr for printing colored error message before throwing a Tcl exception.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <Draw_Marker3D.hxx>
|
||||
#include <Draw_Color.hxx>
|
||||
#include <Draw_MarkerShape.hxx>
|
||||
#include <Message.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array2OfPnt.hxx>
|
||||
#include <TColStd_Array2OfReal.hxx>
|
||||
@@ -90,7 +91,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
{
|
||||
if ( n < 5)
|
||||
{
|
||||
std::cout << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]" << std::endl;
|
||||
Message::SendFail() << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user