in reply to Re^5: Scoping question - will file handle be closed? (close errors)
in thread Scoping question - will file handle be closed?
If I have no logical recovery step for "incomplete data", then I will just warn when close fails.
And that is really the point I'm arriving at; and your clarification of some of possibilities has taken me ever closer.
Basically, there is never a logical recovery step; because the actually failure that gets reported by close may have happened hours ago; and because the range of possibilities is so diverse; and because it would be literally impossible to program a recovery for the vast majority of them.
So, (IMO) the only logical step would be to modify close so that it automatically logged any errors.
It ought be able to extract filenames from handles, ips/socknums from sockets etc. and generally produce a much more detailed account of the failure than user code could hope to do.
And it would relieve the programmer from that burden. I guess I would like an autowarn rather than autodie pragma.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Scoping question - will file handle be closed? (autowarn)
by tye (Sage) on Jul 15, 2015 at 18:33 UTC |