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

Luca Olivetti luca at wetron.es
Tue Mar 28 00:48:28 CEST 2023


El 28/3/23 a les 0:45, Luca Olivetti via lazarus ha escrit:
> 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);

or

MyException:=TExceptionClass(ut.FatalException.ClassType).Create(Exception(ut.FatalException).message)

(TObject already has a ClassType, no need to cast it to Exception).


> 
> 
>> 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...
> 
> 
> Bye

-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007



More information about the lazarus mailing list