From fcc380230ae7def6bd8c11c559e53bfc4ceac09b Mon Sep 17 00:00:00 2001 From: Alexander Demidovskij Date: Fri, 1 Apr 2022 08:49:38 +0300 Subject: [PATCH] [BUG] Markers for error handling (#4) --- .idea/misc.xml | 2 +- lingvo-dss.iml | 1 + src/main/java/dss/lingvo/Main.java | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 55cbf06..ca4b995 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,7 +3,7 @@ - + \ No newline at end of file diff --git a/lingvo-dss.iml b/lingvo-dss.iml index a4e8305..4b49125 100644 --- a/lingvo-dss.iml +++ b/lingvo-dss.iml @@ -4,6 +4,7 @@ + diff --git a/src/main/java/dss/lingvo/Main.java b/src/main/java/dss/lingvo/Main.java index 9b2aec6..e0a9514 100644 --- a/src/main/java/dss/lingvo/Main.java +++ b/src/main/java/dss/lingvo/Main.java @@ -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); @@ -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); } @@ -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; }