Board index » delphi » Runtime Error Handler

Runtime Error Handler

Ok, here's the task at hand.

I need to make an error handler that upon getting a runtime error brings up
a menu with 3 options.

1.  Save screen to ERROR.LOG and exit
2.  Normal program termination.
3.  Ignore error and continue.

Now then, #1 and #2 are no problem.  however.. #3 is a problem. :)  Does
anyone know how i might go about jumping back to the instruction after the
one that failed, or any other idea on how to accomplish this?  

I know it can be done.  Bo Bendtson does it in his terminal program called
Terminate.  I've emailed him, and have yet to get a response.

a *BIG* thanks to anyone who can help.

oh, btw.. this is a BP7 real-mode app.  I have modified the Delphi 1.0 RTL
units so as i can use the -cd switch to compile dos progs with it.  I don't
know if that might help me out or not, but its an idea. <shrug>

--
__/\__ .name: Brandon Sneed (nivenh)
\ Oo / .mail: brand...@ttgwest.com
/_/\_\ .comp: Travel Technologies Group

 

Re:Runtime Error Handler


Quote
"Brandon Sneed" <brand...@ttgwest.com> writes:
>Ok, here's the task at hand.
>I need to make an error handler that upon getting a runtime error brings up
>a menu with 3 options.
>1.  Save screen to ERROR.LOG and exit
>2.  Normal program termination.
>3.  Ignore error and continue.
>Now then, #1 and #2 are no problem.  however.. #3 is a problem. :)  Does
>anyone know how i might go about jumping back to the instruction after the
>one that failed, or any other idea on how to accomplish this?  
>I know it can be done.  Bo Bendtson does it in his terminal program called
>Terminate.  I've emailed him, and have yet to get a response.
>a *BIG* thanks to anyone who can help.

http://www.mi.uni-erlangen.de/~heckenb/programs.htm#BPTrap

You may be able to use the code as it is, or you may need to modify it, maybe
putting your menu into the exit proc. Since you don't have to mess with the
critical parts of the code, it should be feasible. If you can't get it to
work, mail me with your code.

Quote
> oh, btw.. this is a BP7 real-mode app.  I have modified the Delphi 1.0 RTL
> units so as i can use the -cd switch to compile dos progs with it.  I don't
> know if that might help me out or not, but its an idea. <shrug>

I heard Delphi has some kind of exception handling that might simplify things,
but I don't know Delphi myself.

Hope this helps,
Frank

Other Threads