3 lines
173 B
Scala
3 lines
173 B
Scala
def callStack = try { error("exception") } catch { case ex => ex.getStackTrace drop 2 }
|
|
|
|
def printStackTrace = callStack drop 1 /* don't print ourselves! */ foreach println
|