[Lazarus] animated splash screen for lengthy operation, works with windows, doesn't with linux

Michael Van Canneyt michael at freepascal.org
Tue Mar 28 01:21:49 CEST 2023



On Tue, 28 Mar 2023, Luca Olivetti via lazarus wrote:

> El 28/3/23 a les 0:01, Michael Van Canneyt ha escrit:
>
>> 
>> My bad, I made a typo, it should have been
>> 
>> MyException:=ExceptionClass(ut.FatalException).ClassType).Create(Exception(ut.FatalException).message)
>
> Thank you.
>
> Actually it is
>
> MyException:=TExceptionClass(Exception(ut.FatalException).ClassType).Create(Exception(ut.FatalException).message); 
>
>
>> with ExceptionClass= class of exception;
>> 
>> Actually, I never write it like this in one statement, 
>
> Yep, it's quite a mouthful, I had to break it up to spot the error :-)
>
>> I save the class pointer and message
>> in local variables, do cleanup first and then use the class pointer and
>> message later to raise an exception. But the effect is the same: you create
>> a copy with the same class and message as the original.
>
> But not with the same detail (i.e. any extra fields are missing).
> Not that I'm really interested in them (usually I just use the message), but 
> still...

I am aware of that. But the extra fields are usually only interesting in the
debugger. You will see them if you inspect ut.FatalException. For the user
normally only the message is interesting.

Michael.


More information about the lazarus mailing list