RosettaCodeData/Task/Exceptions/AutoHotkey/exceptions-1.ahk
2023-07-01 13:44:08 -04:00

8 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)
}