Development Specs: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(moved to trac)
 
(132 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Systematic Approach ==
{{MovedToTrac|MessageStandardization}}
* Collect all possible error states from functions
* assign error codes for macros?
 
* G_option() parameters (like output->description = ("Path to resulting ASCII file");)
 
== How should Errors/Warnings/Messages be formatted ==
* strings < >
* numbers [ ]
 
== Macros to be defined for C library ==
* MSG_RASTER_NOT_FOUND_IN_MAPSET - "Raster map <%s> not found in <%s>"
* MSG_CANNOT_OPEN_RASTER - "Failed opening raster map <%s>"
* MSG_CANNOT_OPEN_FILE - Cannot open file <%s>
 
== Parameters and flags ==
 
Fix the parameters and flags. Make it a concept. See proposal in GRASS 5 [http://freegis.org/cgi-bin/viewcvs.cgi/grass/documents/parameter_proposal.txt?rev=HEAD&content-type=text/vnd.viewcvs-markup documents/parameter_proposal.txt]
 
== Verbosity levels ==
 
;Abstract concept
 
{|
|-
|standard || 3 || PERMSG_MODE || print progress and messages
|-
|standard || 2 || MESSAGE_MODE || print only messages
|-
|brief || 1 || PERCENT_MODE || print only progress information
|-
|silent but not mute || 0 || QUIET_MODE || print nothing (but ERR and WAR)
|-
|mute || 2>&1 > /dev/null
|-
|}
 
;Proposal
 
* module output (should be &quot;parsable&quot;) is not controlled by GRASS_VERBOSE [use fprintf (stdout, ...)]
* silent
** only warnings and fatal errors are printed
* brief
** all G_percent() and selected G_message() (especially connected to progress information, up to the programmer ??)
* standard
** all G_percent() and selected G_message()
* verbose
** all G_percent() + G_message()
 
;Modification
 
* remove verbose level &rarr; standard == all G_percent () + G_messages()
* move some messages to G_debug()

Latest revision as of 12:42, 2 August 2009