@open class Exception(msg: String): Throwable(msg) { @override fun printStackTrace() { if super.getMessage() !== nil { println("Exception: " + super.getMessage()); } else { println("Exception"); } let x = self.getStackTrace(); var i = 0; while i < x.length() { println(i.toString() + ": " + x.get(i).toString()); i = i + 1; } } }