RosettaCodeData/Task/Exceptions/AutoHotkey/exceptions-1.ahk

9 lines
156 B
AutoHotkey

try
BadlyCodedFunc()
catch e
MsgBox % "Error in " e.What ", which was called at line " e.Line
BadlyCodedFunc() {
throw Exception("Fail", -1)
}