Bug: a better error message if the log file is unwriteable

Motivation

If somebody screws up the permissions on the logfile directory, then when trying to save a topic, it will appear to just hang.

Description

Dies with an error message if the logfile is unwriteable.

Documentation

None.

Examples

None.

Implementation

This is a very simple patch, changing only one line of code.

The error message that I chose might not have the exact wording that you would choose

It looked to me from a casual glance that there might be other opportunities to give meaningful error messages if files couldn't be written to.

Note: Patch is attached as https://www.twiki.org:443/p/pub/Codev/BetterErrorMessageIfLogFileUnwriteable/BetterErrorMessageIfLogFileUnwriteable.diff .

The patch is against the HEAD of CVS of Store.pm as of today, 9 June 2004, version 1.89.


Discussion:

Pretty simple:

 open( FILE, ">>$filename");
to
 open( FILE, ">>$filename") || die "The web server can't write to the file $filename.\n\nThis error is";


Whoops, I didn't realize this was better submitted as a BugReport! I changed it shortly after filing -- -- DS
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff BetterErrorMessageIfLogFileUnwriteable.diff r1 manage 0.6 K 2004年06月10日 - 00:46 UnknownUser
Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008年08月24日 - TWikiJanitor
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

AltStyle によって変換されたページ (->オリジナル) /