Exit with return code 255 rather than -1 in the event of error. Also exit with
an error if an exception is caught while generating the diffs.
This commit is contained in:
@@ -220,7 +220,7 @@ public class Differ
|
|||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
System.err.println(
|
System.err.println(
|
||||||
"Usage: Differ [-verbose] new_vers_dir old_vers_dir");
|
"Usage: Differ [-verbose] new_vers_dir old_vers_dir");
|
||||||
System.exit(-1);
|
System.exit(255);
|
||||||
}
|
}
|
||||||
Differ differ = new Differ();
|
Differ differ = new Differ();
|
||||||
boolean verbose = false;
|
boolean verbose = false;
|
||||||
@@ -234,6 +234,7 @@ public class Differ
|
|||||||
new File(args[aidx++]), verbose);
|
new File(args[aidx++]), verbose);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
System.err.println("Error: " + ioe.getMessage());
|
System.err.println("Error: " + ioe.getMessage());
|
||||||
|
System.exit(255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user