com.wa9nnn.wa9nnnutil.tableui.ExceptionRenderer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wa9nnnutil_3 Show documentation
Show all versions of wa9nnnutil_3 Show documentation
Utils for scala3 and playframework 3.x.
The newest version!
package com.wa9nnn.wa9nnnutil.tableui
import java.io.{PrintWriter, StringWriter}
object ExceptionRenderer {
def apply(exception: Exception):String = {
val stringWriter: StringWriter = new StringWriter()
val writer:PrintWriter = new PrintWriter(stringWriter)
exception.printStackTrace(writer)
writer.close()
stringWriter.toString
}
}