GRASS library exits.

Greg Spencer greg at longs.lance.colostate.edu
Mon Mar 30 12:48:16 EST 1992


Hi folks, 

	I an developing a graphical user-interface which uses GRASS to 
manipulate maps from our study area, and I am getting kind of frustrated
with the number of unexpected exits I receive.    My problem is that since
my program is meant to be as simple to use as possible, and to be completely
stand-alone (not run in GRASS shell) I would like to have grass just tell me
when it gets a fatal error, and not force my program to exit like a dog
brought up short on a leash -- my users simply won't understand what happened.

	I could, of course, pull out the 20-odd calls to exit() in the 
GRASS libraries, but I don't want to be non-standard.  I want to be
able to update to a new GRASS version with ease.

	Is there anybody else out there who has had this problem?  The
worst exit is in G_gisinit, when a mapset is determined to be
non-writable (i.e.  PERMANENT), so it exits.  Since my program mainly
just displays maps, not modifies them, writability is not an issue here
and my program should just pop up a warning dialog and continue, not
fall on its nose.

	Any suggestions?

			-Greg.



More information about the grass-dev mailing list