Skip to content

Commit

Permalink
exit with 1 when program fails
Browse files Browse the repository at this point in the history
  • Loading branch information
simonedegiacomi committed Aug 14, 2019
1 parent 64b1689 commit 9b25195
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/it/simonedegiacomi/files2uf2/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ private static void packFiles() throws IOException {
UF2BlocksUtils.packFilesToUF2(sourceFiles, destinationFile);
System.out.println("UF2 file successfully created");
} catch ( Exception e ) {
System.out.println("error while creating the uf2 file:" + e.getMessage());
e.printStackTrace();
System.out.println("error while creating the uf2 file: " + e.getMessage());
System.exit(1);
}
}

Expand All @@ -40,8 +40,8 @@ private static void unpackFiles() throws IOException {
UF2BlocksUtils.unpackUF2ToFolder(uf2SourceFile, destinationFile);
System.out.println("UF2 file successfully extracted");
} catch ( Exception e ) {
System.out.println("error while unpacking the uf2 file:" + e.getMessage());
e.printStackTrace();
System.out.println("error while unpacking the uf2 file: " + e.getMessage());
System.exit(1);
}
}

Expand Down

0 comments on commit 9b25195

Please sign in to comment.