[GRASS-dev] trying to test error trapping for invalid gisdbase,
location, and mapset
Hamish
hamish_nospam at yahoo.com
Wed May 30 07:52:30 EDT 2007
works fine for me on Debian/Linux.
* edit ~/.grassrc6
* change GISDBASE, LOCATION_NAME, or MAPSET to something which doesn't
exist.
* start grass.
$ grass63 -gui
Cleaning up temporary files.....
Starting GRASS ...
ERROR: MAPSET user3 not found
[GUI starts, pick something real, Enter GRASS, ...]
That error comes from G_gisinit() or G_mapset().
with a broken LOCATION_NAME:
$ grass63 -gui
Cleaning up temporary files.....
Starting GRASS ...
access: No such file or directory
ERROR: LOCATION << /home/hamish/grassdata/spearfish601 >> not available
[friendly tcl GUI window pops up saying the location couldn't be found,
try another]
that error is from G_location_path().
with a broken GISDBASE, same
ERROR: LOCATION << /... >> not available
but now tcl GUI has two nice error popups, drops to parent dir.
Michael: does it work (ie not crash out) for you with "grass63 -text"?
maybe lib/init/lock.c should call
G_set_program_name(argv[0]);
G_no_gisinit();
or lib/init/set_data.c should call
G_set_program_name(argv[0]);
??
as they use G_fatal_error() and things.
Hamish
More information about the grass-dev
mailing list