Anonymous | Login | 2021-01-23 10:42 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0029024 | Open CASCADE | [OCCT] OCCT:DRAW | public | 2017-08-21 11:11 | 2020-09-11 15:43 | ||||||||
Reporter | abv | ||||||||||||
Assigned To | apn | ||||||||||||
Priority | normal | Severity | minor | ||||||||||
Status | new | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | |||||||||||||
Target Version | [OCCT] 7.6.0* | Fixed in Version | |||||||||||
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: <code> Standard_Integer mycommand (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv) { if (theArgc < 3) { return theDI.ErrorOnWrongArgs (theArgv[0]); } ... } </code> 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 | |||||||||||||
Attached Files | |||||||||||||
![]() |
|
(0069710) abv (manager) 2017-08-21 13:26 edited on: 2017-08-21 16:49 |
Method Draw_Interpretor::ErrorOnWrongArgs() is implemented in branch CR29024 |
(0069722) 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. |
![]() |
|||
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* |
Copyright © 2000 - 2021 MantisBT Team |