diff --git a/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java b/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
index cdb7807081..1dcbb51be9 100644
|
a
|
b
|
import org.openstreetmap.josm.cli.CLIModule;
|
| 19 | 19 | import org.openstreetmap.josm.data.coor.EastNorth; |
| 20 | 20 | import org.openstreetmap.josm.data.coor.LatLon; |
| 21 | 21 | import org.openstreetmap.josm.data.coor.conversion.LatLonParser; |
| | 22 | import org.openstreetmap.josm.spi.lifecycle.Lifecycle; |
| | 23 | import org.openstreetmap.josm.tools.Logging; |
| 22 | 24 | import org.openstreetmap.josm.tools.OptionParser; |
| 23 | 25 | |
| 24 | 26 | /** |
| … |
… |
public class ProjectionCLI implements CLIModule {
|
| 74 | 76 | try { |
| 75 | 77 | run(fromStr, toStr, otherPositional); |
| 76 | 78 | } catch (ProjectionConfigurationException | IllegalArgumentException | IOException ex) { |
| 77 | | System.err.println(tr("Error: {0}", ex.getMessage())); |
| 78 | | System.exit(1); |
| | 79 | Logging.error(ex); |
| | 80 | Lifecycle.exitJosm(true, 1); |
| 79 | 81 | } |
| 80 | | System.exit(0); |
| | 82 | Lifecycle.exitJosm(true, 0); |
| 81 | 83 | } |
| 82 | 84 | |
| 83 | 85 | /** |
| … |
… |
public class ProjectionCLI implements CLIModule {
|
| 85 | 87 | */ |
| 86 | 88 | private static void showHelp() { |
| 87 | 89 | System.out.println(getHelp()); |
| 88 | | System.exit(0); |
| | 90 | Lifecycle.exitJosm(true, 0); |
| 89 | 91 | } |
| 90 | 92 | |
| 91 | 93 | private static String getHelp() { |
diff --git a/src/org/openstreetmap/josm/data/validation/ValidatorCLI.java b/src/org/openstreetmap/josm/data/validation/ValidatorCLI.java
index 595d7d70c2..cd4164c37f 100644
|
a
|
b
|
import org.openstreetmap.josm.tools.Utils;
|
| 68 | 68 | * @since 18365 |
| 69 | 69 | */ |
| 70 | 70 | public class ValidatorCLI implements CLIModule { |
| 71 | | /** |
| 72 | | * The unique instance. |
| 73 | | */ |
| | 71 | /** |
| | 72 | * The unique instance. |
| | 73 | */ |
| 74 | 74 | public static final ValidatorCLI INSTANCE = new ValidatorCLI(); |
| 75 | 75 | |
| 76 | 76 | /** The input file(s) */ |
| … |
… |
public class ValidatorCLI implements CLIModule {
|
| 384 | 384 | switch (option) { |
| 385 | 385 | case HELP: |
| 386 | 386 | showHelp(); |
| 387 | | System.exit(0); |
| | 387 | Lifecycle.exitJosm(true, 0); |
| 388 | 388 | break; |
| 389 | 389 | case DEBUG: |
| 390 | 390 | this.logLevel = Logging.LEVEL_DEBUG; |
diff --git a/src/org/openstreetmap/josm/gui/MainApplication.java b/src/org/openstreetmap/josm/gui/MainApplication.java
index 8aa31512fa..c2848b500f 100644
|
a
|
b
|
public class MainApplication {
|
| 276 | 276 | try { |
| 277 | 277 | args = new ProgramArguments(argArray); |
| 278 | 278 | } catch (IllegalArgumentException e) { |
| 279 | | System.err.println(e.getMessage()); |
| 280 | | System.exit(1); |
| | 279 | Logging.error(e); |
| | 280 | Lifecycle.exitJosm(true, 1); |
| 281 | 281 | } |
| 282 | 282 | mainJOSM(args); |
| 283 | 283 | } |
| … |
… |
public class MainApplication {
|
| 1240 | 1240 | Logging.log(Logging.LEVEL_ERROR, |
| 1241 | 1241 | tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.", |
| 1242 | 1242 | s.toUpperCase(Locale.ENGLISH), Option.OFFLINE.getName(), Arrays.toString(OnlineResource.values())), e); |
| 1243 | | System.exit(1); |
| | 1243 | Lifecycle.exitJosm(true, 1); |
| 1244 | 1244 | return; |
| 1245 | 1245 | } |
| 1246 | 1246 | } |
diff --git a/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java b/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java
index a92dd1780d..4ec4db901b 100644
|
a
|
b
|
import org.openstreetmap.josm.gui.mappaint.RenderingHelper.StyleData;
|
| 38 | 38 | import org.openstreetmap.josm.io.Compression; |
| 39 | 39 | import org.openstreetmap.josm.io.IllegalDataException; |
| 40 | 40 | import org.openstreetmap.josm.io.OsmReader; |
| | 41 | import org.openstreetmap.josm.spi.lifecycle.Lifecycle; |
| 41 | 42 | import org.openstreetmap.josm.spi.preferences.Config; |
| 42 | 43 | import org.openstreetmap.josm.spi.preferences.MemoryPreferences; |
| 43 | 44 | import org.openstreetmap.josm.tools.Http1Client; |
| … |
… |
public class RenderingCLI implements CLIModule {
|
| 176 | 177 | e.printStackTrace(); |
| 177 | 178 | } |
| 178 | 179 | System.err.println(tr("Error - file not found: ''{0}''", e.getMessage())); |
| 179 | | System.exit(1); |
| | 180 | Lifecycle.exitJosm(true, 1); |
| 180 | 181 | } catch (IllegalArgumentException | IllegalDataException | IOException e) { |
| 181 | 182 | if (Logging.isDebugEnabled()) { |
| 182 | 183 | e.printStackTrace(); |
| 183 | 184 | } |
| 184 | 185 | if (e.getMessage() != null) { |
| 185 | | System.err.println(tr("Error: {0}", e.getMessage())); |
| | 186 | Logging.error(e); |
| 186 | 187 | } |
| 187 | | System.exit(1); |
| | 188 | Lifecycle.exitJosm(true, 1); |
| 188 | 189 | } |
| 189 | | System.exit(0); |
| | 190 | Lifecycle.exitJosm(true, 0); |
| 190 | 191 | } |
| 191 | 192 | |
| 192 | 193 | /** |
| … |
… |
public class RenderingCLI implements CLIModule {
|
| 227 | 228 | switch (o) { |
| 228 | 229 | case HELP: |
| 229 | 230 | showHelp(); |
| 230 | | System.exit(0); |
| | 231 | Lifecycle.exitJosm(true, 0); |
| 231 | 232 | break; |
| 232 | 233 | case DEBUG: |
| 233 | 234 | argDebug = true; |