MantisBT
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:112017-08-21 16:49
Reporterabv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.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:

<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)
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
(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.

- 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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker