Sign in Join

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

Mailing lists / fpc-pascal / 2005-10

Nice portable error/notification messages

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

L505

What is the way to write nice error out, on any style of program?

I remember some function that gave errors properly no matter what style of program: GUI, console, etc.

So on a console, the error message would be a writeln, but on a GUI program the error would be a showmessage style error. All this handled automatically by the wrapper. Just can't put my finger on where I saw this function and in which units.

i.e. It's time I stop using writeln calls for errors, because that just isn't the portable way to do it.

In fact not just for abrupt and abnoxious errors, but simple polite notifications too.