<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi all,<br><br>I noticed that splitter is quite relaxed regarding error handling ;-)<br>For example, all kinds of I/O errors are catched and may produce<br>stack traces, but processing continues with more or less useless<br>results. Example stdout for a corrupted o5m input :<br><font style="" face="Courier New">Processing test.o5m</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">java.io.IOException: wrong header byte 13</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.O5mMapParser.parse(O5mMapParser.java:124)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.Main.processOSMFiles(Main.java:1379)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.Main.processMap(Main.java:891)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.Main.calculateAreas(Main.java:579)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.Main.split(Main.java:259)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.Main.start(Main.java:180)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at uk.me.parabola.splitter.Main.main(Main.java:152)</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">in 1 file</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Time: Wed May 14 08:24:16 CEST 2014</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Failed to calculate areas. See log for details.</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Failed to calculate areas.</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Sorry. Cannot split the file without creating huge, almost empty, tiles.</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Please specify a bounding polygon with the --polygon-file parameter.</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Time finished: Wed May 14 08:24:16 CEST 2014</font><font style="" face="Courier New"><br></font><font style="" face="Courier New">Total time taken: 0s</font><font style="" face="Courier New"><br></font><br>I think splitter should be changed so that it stops immediately with rc 1 if<br>- an input file is missing or can't be read (e.g. invalid numbers, corrupted binary files, etc.)<br>- an output file can't be written (no access rights, disk full, etc)<br><br>and a useful error message in stdout and stderr.<br><br>I try to code it like this in the new refactoring branch. <br>I also try to code a new log handling, so that debug info is written to its own file.<br><br>Gerd<br><br>                                               </div></body>
</html>