[mkgmap-dev] error handling in splitter
From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed May 14 07:42:37 BST 2014
Hi all, I noticed that splitter is quite relaxed regarding error handling ;-) For example, all kinds of I/O errors are catched and may produce stack traces, but processing continues with more or less useless results. Example stdout for a corrupted o5m input : Processing test.o5m java.io.IOException: wrong header byte 13 at uk.me.parabola.splitter.O5mMapParser.parse(O5mMapParser.java:124) at uk.me.parabola.splitter.Main.processOSMFiles(Main.java:1379) at uk.me.parabola.splitter.Main.processMap(Main.java:891) at uk.me.parabola.splitter.Main.calculateAreas(Main.java:579) at uk.me.parabola.splitter.Main.split(Main.java:259) at uk.me.parabola.splitter.Main.start(Main.java:180) at uk.me.parabola.splitter.Main.main(Main.java:152) in 1 file Time: Wed May 14 08:24:16 CEST 2014 Failed to calculate areas. See log for details. Failed to calculate areas. Sorry. Cannot split the file without creating huge, almost empty, tiles. Please specify a bounding polygon with the --polygon-file parameter. Time finished: Wed May 14 08:24:16 CEST 2014 Total time taken: 0s I think splitter should be changed so that it stops immediately with rc 1 if - an input file is missing or can't be read (e.g. invalid numbers, corrupted binary files, etc.) - an output file can't be written (no access rights, disk full, etc) and a useful error message in stdout and stderr. I try to code it like this in the new refactoring branch. I also try to code a new log handling, so that debug info is written to its own file. Gerd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140514/c54536c3/attachment.html>
- Previous message: [mkgmap-dev] spltter r342
- Next message: [mkgmap-dev] error handling in splitter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list