Right way to use Try, Catch and Throw

BlitzMax Forums/BlitzMax Programming/Right way to use Try, Catch and Throw

Tibit(Posted 2006) [#1]
It have to be there for some reason and I suspect that reason is debugging. So if I want to make something with superb debugging, can I use Throw,Try,Catch in some smart way? Does it only apply in debugmode?

Java has some similar feature, is it the same, what is different?

Any links on the subject?

Thanks for any help :)


Dreamora(Posted 2006) [#2]
It is more or less exactly the same as in Java with the difference that BM does not enforce try catch if something is able to throw an error. In debug a not catched throw will result with a runtime error.


Damien Sturdy(Posted 2006) [#3]

In debug a not catched throw will result with a runtime error.



I hope Max is better at Catching than I am...


Dreamora(Posted 2006) [#4]
What I meant: If something is thrown while in Debug mode and there is no try - catch that handles that thrown error, then it will popup a runtime error on its own. So it won't be missed.

In release build, such an error would pass untouched.