- catch exception if update.log can't be opened in /tmp/ (which should never happen)

This commit is contained in:
Michael Kaufmann (d00p)
2010-05-31 06:04:51 +00:00
parent eed7776e86
commit f4026c1df5
2 changed files with 11 additions and 1 deletions

View File

@@ -22,7 +22,14 @@ $updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $db,
$updatelogfile = validateUpdateLogFile(makeCorrectFile(dirname(__FILE__).'/update.log')); $updatelogfile = validateUpdateLogFile(makeCorrectFile(dirname(__FILE__).'/update.log'));
$filelog = FileLogger::getInstanceOf(array('loginname' => 'updater'), $settings); $filelog = FileLogger::getInstanceOf(array('loginname' => 'updater'), $settings);
$filelog->setLogFile($updatelogfile); $filelog->setLogFile($updatelogfile);
$filelog->logAction(ADM_ACTION, LOG_WARNING, '-------------- START LOG --------------');
// if first writing does not work we'll stop, tell the user to fix it
// and then let him try again.
try {
$filelog->logAction(ADM_ACTION, LOG_WARNING, '-------------- START LOG --------------');
} catch(Exception $e) {
standard_error('exception', $e->getMessage());
}
/* /*
* since froxlor, we have to check if there's still someone * since froxlor, we have to check if there's still someone

View File

@@ -1420,4 +1420,7 @@ $lng['redirect_desc']['rc_found'] = 'found';
$lng['redirect_desc']['rc_seeother'] = 'see other'; $lng['redirect_desc']['rc_seeother'] = 'see other';
$lng['redirect_desc']['rc_tempred'] = 'temporary redirect'; $lng['redirect_desc']['rc_tempred'] = 'temporary redirect';
// ADDED UN FROXLOR 0.9.8
$lng['error']['exception'] = '%s';
?> ?>