On Fri, Apr 1, 2011 at 9:09 AM, Bart <bartjun...@gmail.com> wrote:
>> The test case was an invalid filename.  Is this the primary failure
>> method?
>
> This was merely to demonstrate the possibility of the destructor failing.

What other things would make the destructor of the TIniFile fail?  It
seems to me like a lot of effort to trap something that will rarely
happen.  You can check for the likely things to go wrong up front
(invalid filename, path doesn't exist, no write permissions, disk
quota full, whatever else seems likely), and that would eliminate
almost anything that could possibly go wrong later (for this
particular component), apart from the aforementioned someone messing
with the file system behind your back.  Sure, it isn't "complete", but
it is probably "sufficient".

Jeff.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to