Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Removes exception swallowing, throws exceptions up instead #6

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class JerksonProvider[A] extends AbstractMessageReaderWriterProvider[A] {
try {
Json.generate(t, entityStream)
} catch {
case e: IOException => logger.debug("Error writing to stream", e)
case e => logger.error("Error encoding %s as JSON".format(t, e))
case e: IOException => throw new WebApplicationException("Error writing to stream", e)
case e => throw new WebApplicationException("Error encoding %s as JSON".format(t, e))
}
}

Expand Down