squeryl/squeryl — pull request #191 by voronaam (2014-11-28 00:31:01+00:00)
Title: Improve error message if the Option type detection failed

I have encountered this today. When running scala 2.10 and squeryl 0.9.6-RC3 without scalap in classpath the error was unrelated:

Caused by: scala.MatchError: null
at org.squeryl.internals.FieldMetaData$$anon$1.build(FieldMetaData.scala:454) ~[FieldMetaData$$anon$1.class:0.9.6-RC3]

The reason is that match by null fails and no error about scalap is printed.

I have also changed the code to have the original exception as well. In includes valuable information. In my case it was

Caused by: scala.tools.scalap.scalax.rules.ScalaSigParserError: Unexpected failure
at scala.tools.scalap.scalax.rules.Rules$$anonfun$expect$1.apply(Rules.scala:68) ~[Rules$$anonfun$expect$1.class:?]

Which I was not able to investigate without the stacktrace.