Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 0517428

Browse files
committed
Merge pull request #32 from briantopping/pr32
Expose swallowed exception
2 parents d3f611a + da6a1fb commit 0517428

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/scala/epic/models/package.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ package object models {
5757
try {
5858
readFromJar("", f)
5959
} catch {
60-
case ex: IOException =>
61-
throw new RuntimeException(s"Could not find model $model in path $path")
60+
case ex: Exception =>
61+
throw new RuntimeException(s"Could not find model $model in path $path", ex)
6262
}
6363

6464
}

src/main/scala/epic/util/ProcessTextMain.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ trait ProcessTextMain[Model, AnnotatedType] {
4242
epic.models.deserialize[Model](params.model.toString)
4343
} catch {
4444
case ex: Exception =>
45+
// BT 20150514 - skanky hack to get message to screen, would be nicer if could say "enable debug messages for full trace"
46+
System.err.println(s"Couldn't deserialize model due to exception, ${ex.getCause.getMessage}. Trying classPathLoad...")
4547
classPathLoad(params.model.toString)
4648
}
4749

0 commit comments

Comments
 (0)