[Lazarus] Exception dialog

Michael Van Canneyt michael at freepascal.org
Tue Mar 17 17:06:18 CET 2009



On Tue, 17 Mar 2009, Martin Friebe wrote:

> Michael Van Canneyt wrote:
> > On Tue, 17 Mar 2009, Martin Friebe wrote:
> >   
> >>> To reject the current value of the field from the OnValidate event
> >>> handler, raise an exception.
> >>>
> >>>   
> >>>       
> >> Then to me the Delphi/Kylix implementation is flawed. Because it forces 
> >> me to do TWO things, even if I want to do only one of them.
> >> There should be:
> >> - an ExceptionClass TDataValitaionException (or whatever) which can be 
> >> used to abort writing the data, but not defer error handling to the mainloop
> >> - any other exception, that aborts the write, and transfers error 
> >> handling to the main loop
> >>
> >> There are usages for both scenarios, so they should both be possible.
> >>     
> >
> > This may be so, but given the implementation as it is in Delphi, 
> > hopefully you can now understand my problem with the Lazarus
> > exception dialog :-)
> >
> >   
> Yes, and no:
> 
> Yes I can, if you leave those exception to be handled by the build-in 
> dialog.
>   Which means that you do not intend to provie any helps or options to 
> the user, but only want to display the message and leave it to the user.
> 
> No,
>  because IMHO you still want to handle it in OnException or similar, and 
> it would therefore be easy to write your own MessageDlg

Well, that's what I did of course :-)

Michael.



More information about the Lazarus mailing list