Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-04

Handling exceptions with debugger

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Chris Kelling

I installed Lazarus 1.2.0 x64. A project ran fine under 1.0.4 i386 it ran fine. Under the new version the {$I-} and {$I+} ioresult coding causes the debugger to stop the execution and show an exception with the return code. What I need is for the debugger to ignore that and let my code handle the io (i.e. I use it for checking files, paths, making directories, etc).

Is there a way to get the debugger to ignore the compiler directives?

-Chris

-------- Everything at or below the line is a signature, not to be confused with the body of the email above. Sorry about the last signature text that seemed to have some people questioning my sanity.

We are what we repeatedly do. Excellence, then, is not an act, but a habit.

-Aristotle

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140415/086c3a15/attachment.html>

Reply by email

Martin Frb
to Chris Kelling
Chris Kelling wrote 9 lines
I installed Lazarus 1.2.0 x64. A project ran fine under 1.0.4 i386 it ran fine. Under the new version the {$I-} and {$I+} ioresult coding causes the debugger to stop the execution and show an exception with the return code. What I need is for the debugger to ignore that and let my code handle the io (i.e. I use it for checking files, paths, making directories, etc). Is there a way to get the debugger to ignore the compiler directives?

It should have halted in 1.0.4 too. Any RunError, will cause the debugger to prompt, and ask break or continue.

I have made a change now, so that you can add (without quotes) "RunError(200)" to the exception list.

You have to add all numbers you wish to ignore, and you also have to add the classname of the resulting exception (since both a run error and an exception will be caught.

This feature is in 1.3 and 1.2.1 both SVN.
It will be in the 1.2.2 release.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140416/79b68ee5/attachment.html>

Reply by email