QB64 Phoenix Edition
UnHandled Errors - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: UnHandled Errors (/showthread.php?tid=3867)



UnHandled Errors - PhilOfPerth - 08-15-2025

Sort of related to Unseen's last post, but not quite, so I'll post it separately:

Is there a reason that Unhandled Error (e.g. Subscript out of range) invites you to continue? 
It won't let you continue anyway with this error. but maybe some errors can continue?  Huh


RE: UnHandled Errors - SMcNeill - 08-15-2025

Aye.  Sometimes you can move on from unhandled errors and keep going with a program.  Generally speaking, if it's something like a subscript out of range, that array is going to be used multiple times, and all you're going to do is click "Continue" "Yes"  "Please give me the same error on the next line too!" until you go insane over it.

Other times, it's a simple one-off-and-done issue that may not terminate the whole program.

Imagine playing a game that wants to load an image of a treasure chest when you defeat the boss.  Your little kid/cat/pet gremlin edited the file that was "treasure.bmp" and made it "truserfs.bmd".  The program can't load that image, and it certainly can't reference it and _PUTIMAGE it, so it's going to toss an error on it when it tries.

But, at the same time, it only tries to load that image once every time you find a treasure chest.  It'll go to reference the image that doesn't exist, toss an error, you can click continue, and then everything else will work except that image won't display on the screen.  You collect your loot, move off that screen, and continue playing the game, instead of just having to stop and shut down anywhere a chest appears in the game.

Many times those errors are endless cycles of doom.   Sometimes they're not.  As the guy who normally writes all the crap (or at least compiles all the crap) that I run in QB64, I tend to note whatever reference it gives me and then exit immediately to go see if I can hunt down the problem.  Without the source though, all you can really do is either quit and continue, and being able to continue -- if possible -- is usually a better option than just always reporting the glitch and then terminating the program completely.


RE: UnHandled Errors - PhilOfPerth - 08-15-2025

Thanks Steve; I suspected there were some cases where it could continue, but haven't found any yet.
Most of my errors are Subscript out of range