1
0
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:
kgv
2020-08-24 19:13:08 +03:00
parent 1d99a2baaa
commit d99f0355e3
98 changed files with 514 additions and 620 deletions

View File

@@ -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;
}