这里应该有一些简单的东西,虽然我完全想念它,因为我是 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
提前致谢!