Sign in Join

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

Mailing lists / fpc-pascal / 2011-01

Issue 0012528: TFPList exception with no excpetion stack printed

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

cobines

Hello,

Can someone comment on this issue? It still exists in current FPC trunk. It seems the patch posted there fixes the issue. Is the patch not good?

Why is "raise ... at" needed instead of just "raise" ?

cobines
Unknown author
to cobines
cobines wrote 5 lines
Hello, Can someone comment on this issue? It still exists in current FPC trunk. It seems the patch posted there fixes the issue. Is the patch not good?

The patch is good, but I suspect a more general patch is needed.

Why is "raise ... at" needed instead of just "raise" ?

Because if you use 'Raise', then the .error method shows up in the stack dump, when the real location is actually in the frame above. It's not actually required, but it is nicer to have the real location as the first frame in your stack list.

Michael.

cobines
to Unknown author

2011/1/28 :

Show quoted text 11 lines
On Fri, 28 Jan 2011, cobines wrote: > Hello, > > Can someone comment on this issue? It still exists in current FPC > trunk. It seems the patch posted there fixes the issue. Is the patch > not good? The patch is good, but I suspect a more general patch is needed.

Meaning there is an issue with "raise at addr" but not with "raise" or "raise at addr, frame" ?

There are other places in RTL that use "raise at addr, frame" so maybe these few places which use "raise at addr" can be changed, at least as a temporary solution, until a more general patch, as you say, is produced.

Show quoted text 9 lines
> > Why is "raise ... at" needed instead of just "raise" ? Because if you use 'Raise', then the .error method shows up in the stack dump, when the real location is actually in the frame above. It's not actually required, but it is nicer to have the real location as the first frame in your stack list.

OK, I see now, thanks.

I looked at fpc_PushExceptObj and it uses frame pointers to create backtrace, so is there a point in calling "raise at addr" with frameptr=nil? Is sometimes frame pointer not possible to retrieve that such construct is allowed?

cobines