fix(sample-kmp): demonstrate throwing functions
This commit is contained in:
parent
9013544898
commit
a24d5102bf
|
@ -2,6 +2,9 @@ import dev.msfjarvis.tracelog.runtime.annotations.DebugLog
|
|||
|
||||
fun main() {
|
||||
debuggableFunction("First parameter")
|
||||
try {
|
||||
throwingFunction()
|
||||
} catch (_: Exception) {}
|
||||
LogPrinter.printLogs()
|
||||
}
|
||||
|
||||
|
@ -16,3 +19,8 @@ fun recordMessage(message: Any?) {
|
|||
fun debuggableFunction(p0: String, p1: String = "Bar"): String {
|
||||
return "Debugging is cool!"
|
||||
}
|
||||
|
||||
@DebugLog
|
||||
fun throwingFunction() {
|
||||
throw Exception("This code is throwing!")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue