Catching Error Messages
BlitzMax Forums/BlitzMax Programming/Catching Error Messages
| ||
Is there a way to get better information from an error message. In the following code, all I get is the error. Is there a way to capture the class name or the function or method that caused the crash?Catch ex:Object Print ex.ToString() End |
| ||
Only if you throw them, so its up to you what error you send. I would even create own error types which are extended from the base one. BM modules don't throw errors at all. They just have a return value of null or MAV ;-) |
| ||
That means that I have to put try and catch inside a ton of functions. Right now, I am just catching the errors in the main application. |