Advertisement

Catching two in a row

Started by January 09, 2019 05:45 PM
3 comments, last by johannesg 5 years, 10 months ago

It seems if I have two try/catch blocks in a row in a function, the second one doesn't seem to catch anything. For example, this script:

void main() {
    try { throw ("1"); }
    catch { print ("Exception 1"); }

    try { throw ("2"); }
    catch { print ("Exception 2"); }

    try { throw ("3"); }
    catch { print ("Exception 3"); }
}

prints only this:

Exception 1
2

So the first exception is caught and handled correctly, and the second one aborts the script (which prints the aborting exception, in my case, so you see the "2").

Thanks for the report. I'll investigate and correct this

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement

I've fixed this in revision 2579.

I'm sorry for the delay.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thanks!

This topic is closed to new replies.

Advertisement