[fpc-pascal] exiting a program more friendly way

Tony Pelton tpelton at gmail.com
Fri Jun 23 15:58:01 CEST 2006


please trim your posts.

thanks,
Tony

On 6/23/06, Pianoman <pianoman at centrum.sk> wrote:
>
> Hi, I'd like to ask whether is it possible to exit program in case of
> runtime error 202 for example more nicely than with message runtime error
> 202 at a1d456d5621blablabla
> For example:
> writeln('starting to divide:');
> writeln(2/0);
> and I don't want mi program to stop with runtime error but I 'd like to
> write to screen something like: writeln('program has atempted to divide by
> zero enter another expression.');
> old tp had a special procedure exitproc which allowed to set which code
> should be executed before terminating in case of run-time error. I mean code
> which will close opened files or something like that or it could write to
> logfile the reason of error.
> Thanx in advance
> Pianoman



More information about the fpc-pascal mailing list