Skip to content

Commit

Permalink
Logcat will now tell you what file it had a problem parsing, if an ex…
Browse files Browse the repository at this point in the history
…ception is caught.
  • Loading branch information
Espen Nersveen committed Jan 24, 2013
1 parent dc30d39 commit 2892871
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion log/src/main/java/org/cloudname/log/logcat/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.cloudname.log.format.LogEventFormatter;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;

/**
Expand Down Expand Up @@ -72,7 +73,11 @@ else if (0 == files.size()) {
}
else {
for (final String filename : files) {
cat.catStream(new FileInputStream(filename));
try {
cat.catStream(new FileInputStream(filename));
} catch (Exception e) {
throw new Exception("Error while attempting to read from " + filename, e);
}
}
}
}
Expand Down

0 comments on commit 2892871

Please sign in to comment.