1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-15 22:05:00 -05:00

Return special exit code if license is expired.

This commit is contained in:
Reinhard Pointner 2018-06-19 01:46:09 +07:00
parent 20cb1448b4
commit 0163d4ffd9

View File

@ -36,9 +36,11 @@ public class ArgumentProcessor {
log.finest("Done ヾ(@⌒ー⌒@)");
return 0;
} catch (LicenseError e) {
log.severe("License Error: " + e.getMessage());
log.severe(format("License Error: %s", e.getMessage()));
if (LICENSE.isFile()) {
log.info(format("%n%s %s requires a valid license:%n%n=> %s%n%nPlease run `filebot --license *.psm` to install your FileBot license.%n", getApplicationName(), getApplicationVersion(), getPurchaseURL()));
return 1;
}
return 2;
} catch (Throwable e) {
if (findCause(e, CmdlineException.class) != null) {
log.log(Level.WARNING, findCause(e, CmdlineException.class).getMessage());