how to implement custom throwable in scala
//scala custom throwable
case class Fooxcp(val message:String) extends Throwable;
try {
throw Fooxcp("hello")
} catch {
case c: Fooxcp =>
println(c.message)
//hello
}