View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029024 | Open CASCADE | OCCT:DRAW | public | 2017-08-21 11:11 | 2023-08-01 15:08 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | feature | ||
Status | new | Resolution | open | ||
Target Version | Unscheduled | ||||
Summary | 0029024: DRAW - use common approach for reporting error message on wrong command arguments | ||||
Description | It 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) | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Method Draw_Interpretor::ErrorOnWrongArgs() is implemented in branch CR29024 |
|
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. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-08-21 11:11 |
|
New Issue | |
2017-08-21 11:11 |
|
Assigned To | => apn |
2017-08-21 13:26 |
|
Note Added: 0069710 | |
2017-08-21 16:48 | git | Note Added: 0069722 | |
2017-08-21 16:49 |
|
Note Edited: 0069710 | |
2019-07-10 22:24 |
|
Target Version | 7.4.0 => 7.5.0 |
2020-09-11 15:43 |
|
Target Version | 7.5.0 => 7.6.0 |
2021-02-23 10:49 | kgv | Description Updated | |
2021-02-23 10:50 | kgv | Description Updated | |
2021-02-23 10:54 | kgv | Relationship added | related to 0031731 |
2021-02-23 10:54 | kgv | Severity | minor => feature |
2021-09-09 22:27 | kgv | Target Version | 7.6.0 => 7.7.0 |
2022-10-24 10:40 |
|
Target Version | 7.7.0 => 7.8.0 |
2023-08-01 15:08 | dpasukhi | Target Version | 7.8.0 => Unscheduled |