Skip to content

Commit

Permalink
[BUG] Markers for error handling (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
demid5111 committed Apr 1, 2022
1 parent d1f640f commit fcc3802
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lingvo-dss.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/out" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/dss/lingvo/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static void main(String[] args) throws IOException {
cmd = parser.parse(options, args);
} catch (ParseException e) {
System.out.println(e.getMessage());
System.out.println("[ERROR] Incorrect list of passed arguments!");
formatter.printHelp("utility-name", options);

System.exit(1);
Expand All @@ -41,7 +42,7 @@ public static void main(String[] args) throws IOException {

File inputFile = new File(inputFilePathRaw);
if (!inputFile.exists()) {
System.out.println("Specified file with task description does not exist. Specify a real description");
System.out.println("[ERROR] Specified file with task description does not exist. Specify a real description!");
System.exit(1);
}

Expand All @@ -54,7 +55,7 @@ public static void main(String[] args) throws IOException {


if (outputDirectory.exists() && !outputDirectory.isDirectory()) {
System.out.println("The path provided as an output directory is not a directory. Specify a real folder.");
System.out.println("[ERROR] The path provided as an output directory is not a directory. Specify a real folder!");
System.exit(1);
return;
}
Expand Down

0 comments on commit fcc3802

Please sign in to comment.