Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/scala/epic/models/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ package object models {
try {
readFromJar("", f)
} catch {
case ex: IOException =>
throw new RuntimeException(s"Could not find model $model in path $path")
case ex: Exception =>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Exception and not Throwable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't spend a lot of time on it, probably could be improved!

throw new RuntimeException(s"Could not find model $model in path $path", ex)
}

}
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/epic/util/ProcessTextMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ trait ProcessTextMain[Model, AnnotatedType] {
epic.models.deserialize[Model](params.model.toString)
} catch {
case ex: Exception =>
// BT 20150514 - skanky hack to get message to screen, would be nicer if could say "enable debug messages for full trace"
System.err.println(s"Couldn't deserialize model due to exception, ${ex.getCause.getMessage}. Trying classPathLoad...")
classPathLoad(params.model.toString)
}

Expand Down