On Mon, 11 Feb 2013, Giuliano Colla wrote:
This is true only if you invoke the program from command line, which is
something the end user will never do.
That is not the problem of TIniFile, but of the application programmer.
TIniFile properly reports any error, as it should, with an exception.
It is always up to the application programmer to deal with such cases.
That this is sometimes tricky in a GUI application, cannot be helped.
It can be helped both by reducing the likelihood of the event, as you've
done, and by not suggesting to use in that case a try..finally construct in a
GUI application, which would mask the errors.
This suggestion comes historically from Delphi literature, but fpc/Lazarus
developers should never forget that they're smarter than Delphi people. ;-)
I didn't suggest anything. I wrote 'deal with such cases'.
How, this I leave up to the programmer.
But I will say this:
trying to format the user's harddrive or attempt to fry his monitor is
usually the wrong approach ;)
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal