Scala: print a stack trace in my Scalatra app

后端 未结 4 1394
萌比男神i
萌比男神i 2021-02-13 18:02

Seems like a fairly straight forward problem, but I\'d like to log a stack trace when my top level error handler in Scalatra is triggered. I\'m intentionally throwing an excepti

4条回答
  •  广开言路
    2021-02-13 18:39

    This question has several ways to convert an exception stack trace to a String. printStackTrace outputs to System.err unless you provide a writer.

提交回复
热议问题