mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -326,13 +326,13 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Integer DDocStd_Close (Draw_Interpretor& /*theDI*/,
|
||||
static Standard_Integer DDocStd_Close (Draw_Interpretor& theDI,
|
||||
Standard_Integer theArgNb,
|
||||
const char** theArgVec)
|
||||
{
|
||||
if (theArgNb != 2)
|
||||
{
|
||||
std::cout << "DDocStd_Close : Error\n";
|
||||
theDI << "DDocStd_Close : Error\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user