[GRASS-dev] Re: [GRASS GIS] #429: Add option to disable warnings in modules

GRASS GIS trac at osgeo.org
Mon Jan 12 19:00:11 EST 2009


#429: Add option to disable warnings in modules
--------------------------+-------------------------------------------------
  Reporter:  kyngchaos    |       Owner:  grass-dev at lists.osgeo.org
      Type:  enhancement  |      Status:  new                      
  Priority:  minor        |   Milestone:  6.4.0                    
 Component:  default      |     Version:  svn-develbranch6         
Resolution:               |    Keywords:                           
  Platform:  Unspecified  |         Cpu:  Unspecified              
--------------------------+-------------------------------------------------
Comment (by hamish):

 Replying to [ticket:429 kyngchaos]:
 > I would like to be able to suppress warning messages in
 > commands, yet keep messages based on the GRASS_VERBOSE level,
 > especially in raster projection (r.proj) where is possible
 > to get thousands of "pj_transform() failed: tolerance condition
 > error" warnings, depending on the projection, that are expected
 > but clutter the progress output and slow down the process.

 better: fix the noisy module. e.g.

 {{{
  if(!pj_fail_flag)
     G_warning();
  else
     pj_fail_flag = TRUE;
 }}}


 > I see that G_warning() has a companion G_suppress_warnings(),
 > so this at least was an intended possibility at one time (but
 > maybe deprecated or discouraged now?).

 vaguely discouraged, as it will inadvertently hide important problems, and
 you /will/ be bitten by this after some time.


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/429#comment:1>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list