这里应该有一些简单的东西,虽然我完全错过了它,因为我是Scala和Play中的菜鸟。这是代码:
case class ExceptionInfo(ExceptionType: String, Message: String, StackTrace: Seq[String])
object ExceptionInfo
{
val excInfoParser = {
get[String]("ExceptionInfo.ExceptionType") ~
get[String]("Message") ~
get[String]("ExceptionInfo.StackTrace") map {
case ExceptionType ~ Message ~ StackTrace => ExceptionInfo(ExceptionType, Message, StackTrace.split("\r\n"))
}
}
}
这不能编译,输出如下:
Description Resource Path Location Type
not found: value ExceptionType Application.scala /testme/app/controllers line 40 Scala Problem
not found: value Message Application.scala /testme/app/controllers line 40 Scala Problem
not found: value StackTrace Application.scala /testme/app/controllers line 40 Scala Problem
not found: value ExceptionType Application.scala /testme/app/controllers line 40 Scala Problem
提前致谢!