[fpc-pascal] FPCUnit test + raise E;
Marcos Douglas
md at delfire.net
Wed Sep 18 23:33:33 CEST 2013
On Tue, Sep 17, 2013 at 2:41 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> On 17.09.2013 17:27, Marcos Douglas wrote:
>>
>> On Tue, Sep 17, 2013 at 12:18 PM, Marcos Douglas <md at delfire.net> wrote:
>>>>
>>>> Another thing you could try (just for testing): change your exception
>>>> handler procedure to a function that returns bool and use it like this:
>>>>
>>>> === code begin ===
>>>>
>>>>
>>>> procedure TghSQLConnector.Connect;
>>>> begin
>>>> try
>>>> FLib.Connect;
>>>> except
>>>> on E: Exception do
>>>> if not DoOnException(E) then
>>>> raise;
>>>> end;
>>>> end;
>>>>
>>>> === code end ===
>>>>
>>>>
>>>> Regards,
>>>> Sven
>>>
>>>
>>> The only difference is the use of raise; instead raise E; right?
>>>
>>> Marcos Douglas
>>
>>
>> In project in attachment before, if you change the line 50
>> from:
>> raise E;
>>
>> to:
>> raise Exception.Create(E.Message);
>>
>> Will work... but is this correct?
>
>
> So this seems to be indeed a problem of freeing exceptions. Whether you
> misuse the exception system or you encountered a bug needs to be
> determined...
If this is a bug I can register in bug tracker.
>> Lazarus 1.1 r42461 FPC 2.6.2 i386-win32-win32/win64
>
>
> Could you test your original one with 2.7.1 as well?
I can't compile Lazarus with FPC 2.7.1 (as you saw in lazarus-list)
so, I can't test... :(
>> PS: Sorry for my late, Sven.
>
>
> No problem. :)
Thanks,
Marcos Douglas
More information about the fpc-pascal
mailing list