logo separator

[mkgmap-dev] [Patch v1] set program return code and improve logging

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue May 6 10:24:42 BST 2014

Hi all,

attached is a patch the should set program return code to 1 in case of severe errors.

It also changes the handling of so called MapFailedExceptions like 
"There is not enough room in a single garmin map..."
or 
"Overflow of the NET1. The tile ..."

These messages are now printed as severe messages via the logging system (showing the input file):
Severe (MapFailedException): \ld_sp\63240003.o5m: (thrown in BufferedImgFileWriter.ensureSize()) There is not enough room in a single garmin map for all the input data. The .osm file should be split into smaller pieces first.

The stdout contains two new messages:
Number of MapFailedExceptions: 3
Number of ExitExceptions: 0

If any of the two shows a non-zero value, the program exits with return code 1.

@WanMil, Steve: Please review.
In Main.java I use "synchronized" to make sure that concurrent updates are handled.
The System.exit() method is only used if the program is not called from another java program.
The code In MapFailedException.log() tries to determine the code that caused the Exception.
I hope this works in all environments?

Gerd

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140506/5f6973cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rc-and-logging-v1.patch
Type: application/octet-stream
Size: 7010 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140506/5f6973cb/attachment.obj>


More information about the mkgmap-dev mailing list