[GRASS-SVN] r62709 - grass/trunk/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 11 12:09:58 PST 2014
Author: wenzeslaus
Date: 2014-11-11 12:09:58 -0800 (Tue, 11 Nov 2014)
New Revision: 62709
Modified:
grass/trunk/lib/python/script/core.py
Log:
pythonlib: describe more error and fatal functions
Modified: grass/trunk/lib/python/script/core.py
===================================================================
--- grass/trunk/lib/python/script/core.py 2014-11-11 19:45:55 UTC (rev 62708)
+++ grass/trunk/lib/python/script/core.py 2014-11-11 20:09:58 UTC (rev 62709)
@@ -571,15 +571,21 @@
def error(msg):
"""Display an error message using `g.message -e`
+ This function does not end the execution of the program.
+ The right action after the error is up to the caller.
+ For error handling using the standard mechanism use :func:`fatal`.
+
:param str msg: error message to be displayed
"""
message(msg, flag='e')
def fatal(msg):
- """Display an error message using `g.message -e`, then abort
+ """Display an error message using `g.message -e`, then abort or raise
- Raise exception when raise_on_error is 'True'.
+ Raises exception when module global raise_on_error is 'True', abort
+ (calls exit) otherwise.
+ Use func:`set_raise_on_error` to set the behavior.
:param str msg: error message to be displayed
"""
More information about the grass-commit
mailing list