diff options
Diffstat (limited to 'src/main/scala/spray')
-rw-r--r-- | src/main/scala/spray/json/ProductFormats.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/scala/spray/json/ProductFormats.scala b/src/main/scala/spray/json/ProductFormats.scala index ad57221..971c7a6 100644 --- a/src/main/scala/spray/json/ProductFormats.scala +++ b/src/main/scala/spray/json/ProductFormats.scala @@ -17,6 +17,7 @@ package spray.json import java.lang.reflect.Modifier +import scala.util.control.NonFatal /** * Provides the helpers for constructing custom JsonFormat implementations for types implementing the Product trait @@ -70,7 +71,7 @@ trait ProductFormats extends ProductFormatsInstances { sys.error("Cannot determine field order of case class " + clazz.getName) fields.map(_.getName) } catch { - case ex => throw new RuntimeException("Cannot automatically determine case class field names and order " + + case NonFatal(ex) => throw new RuntimeException("Cannot automatically determine case class field names and order " + "for '" + clazz.getName + "', please use the 'jsonFormat' overload with explicit field name specification", ex) } } |