No announcement yet.

RaiseError Err questions with debugger

  • Filter
  • Time
  • Show
Clear All
new posts

  • RaiseError Err questions with debugger

    Since I have seen errors that do not trigger the debugger, I wonder if there is a list of errors (and descriptions) that the debugger catches? I see the ones that the compiler catches, but not the debugger. And in situations, Errors that I know exist, but not caught, I would like to raise so the debugger catches them.

    (I know a twist of words about raising (which is run-time) vs compiler (which is compile-time) but would like to "Bullet-proof" a bit better where I can)

    According to docs
    The compiler reserves codes 0 through 150, and 241 through 255 for run-time errors. You may freely use error codes 151 through 240 for your own purposes.
    and I have to look closer at the SDK/API side, but I get the jist of it.

    I would like to ultimately raise an error that the debugger does not normally look for, but does exist, so I can use "run-and-break on error" or even on the other side not break on error because my code was checking to see if a handle existed, but just checking raised the error????

    maybe a bit construed, but a list of what debugger catches would be of great help
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    While not an issue when using the stepping debugger because that always implies #DEBUG ERROR ON when compiled, any PB run-time error listed in the help file should be caught.

    What ISNT caught are the things which are NEVER caught: non-null invalid pointer and arithmetic overflow/underflow.

    You can raise your own trappable errors using the 'ERROR n' statement. i.e.
    %MYERROR  =  151 <= N <= 240
    IF ISTRUE application_condition THEN
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]