Intercepting runtime errors

BlitzMax Forums/BlitzMax Programming/Intercepting runtime errors

JoshK(Posted 2009) [#1]
Is there a way to add information to a runtime error? I am using a Lua interpreter written in BMX, and it would be nice if I could add the last executed line and the script name to the error message.


GW(Posted 2009) [#2]
Are you throwing the error yourself?
check the bmax sources if its trappable. use lots of assertions.


plash(Posted 2009) [#3]
Is there a way to add information to a runtime error?
You could try catching the error and throw it again with new information.


Brucey(Posted 2009) [#4]
Don't throw a String, throw an exception object...