mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-14 21:35:03 -05:00
Use standard exit codes
This commit is contained in:
parent
3258c83cfd
commit
8bb71d8ac0
@ -80,7 +80,7 @@ public class Main {
|
|||||||
// clear cache must be called manually
|
// clear cache must be called manually
|
||||||
if (System.console() == null) {
|
if (System.console() == null) {
|
||||||
System.err.println("`filebot -clear-cache` has been disabled due to abuse.");
|
System.err.println("`filebot -clear-cache` has been disabled due to abuse.");
|
||||||
System.exit(-1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear persistent user preferences
|
// clear persistent user preferences
|
||||||
@ -169,7 +169,7 @@ public class Main {
|
|||||||
} catch (CmdLineException e) {
|
} catch (CmdLineException e) {
|
||||||
// illegal arguments => print CLI error message
|
// illegal arguments => print CLI error message
|
||||||
System.err.println(e.getMessage());
|
System.err.println(e.getMessage());
|
||||||
System.exit(-1);
|
System.exit(1);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
// find root cause
|
// find root cause
|
||||||
while (e.getCause() != null) {
|
while (e.getCause() != null) {
|
||||||
@ -178,7 +178,7 @@ public class Main {
|
|||||||
|
|
||||||
// unexpected error => dump stack
|
// unexpected error => dump stack
|
||||||
debug.log(Level.SEVERE, String.format("Error during startup: %s", e.getMessage()), e);
|
debug.log(Level.SEVERE, String.format("Error during startup: %s", e.getMessage()), e);
|
||||||
System.exit(-1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user