Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029024Open CASCADE[OCCT] OCCT:DRAWpublic2017-08-21 11:112021-02-23 10:54
Assigned Toapn 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0029024: DRAW - use common approach for reporting error message on wrong command arguments
DescriptionIt is a good practice to output clear error message when DRAW command is called with incorrect arguments. This is done in many commands, however not always in the same way. To provide consistent behavior for all commands, it is proposed to:

1. Define common method for reporting this kind of errors, e.g. Draw_Interpretor::ErrorOnWrongArgs(), to be called as follows:

Standard_Integer mycommand (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)

  if (theArgc < 3)
    return theDI.ErrorOnWrongArgs (theArgv[0]);

2. Use this method in all DRAW commands

The new method should:

- Print (to std::cerr) error message indicating that command is called with wrong number of arguments

- Print help for the current command to let the user know what arguments are expected (this help should be already recorded when command is added by method Add())

- Return 1 (indicating error in Tcl)
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0031731closedkgv Open CASCADE Draw Harness - colorize errors and exception messages 

-  Notes
abv (manager)
2017-08-21 13:26
edited on: 2017-08-21 16:49

Method Draw_Interpretor::ErrorOnWrongArgs() is implemented in branch CR29024

git (administrator)
2017-08-21 16:48

Branch CR29024 has been created by abv.

SHA-1: 6d61efef1e3a51ef616350ec715ada67816413ac

Detailed log of new commits:

Author: abv
Date: Mon Aug 21 16:48:23 2017 +0300

    0029024: DRAW - use common approach for reporting error message on wrong command arguments
    Method Draw_Interpretor::ErrorOnWrongArgs() is added, providing user message for DRAW command called with incorrect arguments.

- Issue History
Date Modified Username Field Change
2017-08-21 11:11 abv New Issue
2017-08-21 11:11 abv Assigned To => apn
2017-08-21 13:26 abv Note Added: 0069710
2017-08-21 13:26 abv Relationship added related to 0028964
2017-08-21 16:48 git Note Added: 0069722
2017-08-21 16:49 abv Note Edited: 0069710 View Revisions
2019-07-10 22:24 abv Target Version 7.4.0 => 7.5.0
2020-09-11 15:43 utverdov Target Version 7.5.0 => 7.6.0*
2021-02-23 10:49 kgv Description Updated View Revisions
2021-02-23 10:50 kgv Description Updated View Revisions
2021-02-23 10:54 kgv Relationship added related to 0031731
2021-02-23 10:54 kgv Severity minor => feature

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker