Project

General

Profile

Actions

Bug #22562

closed

Error handler does not catch exception while connecting to DB

Added by Francois Suter over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-05-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The base error handler (t3lib_error_ErrorHandler) tries to connect to the database if the connection doesn't yet exist (this can happen because the error handler may be called very early during TYPO3 initialization).

The DB connection method may throw exceptions if the connection failed. These exceptions should be caught by the error handler. No processing is needed, as there's nothing more that can be done anyway.

The effect of not having a DB connection is that DB-based logs cannot be used. t3lib_error_ErrorHandler::writeLog() does indeed check for DB connection existence before trying to write to the sys_log table. As for external tools, such as those called via t3lib_div::devLog() they just have to care for such a check themselves (extension "devlog" does this).

(issue imported from #M14275)


Files

14275.diff (915 Bytes) 14275.diff Administrator Admin, 2010-05-01 22:30

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #19336: Add an error and exception handler (backported from FLOW3)ClosedRupert Germann2008-09-16

Actions
Actions #1

Updated by Francois Suter over 14 years ago

Committed to trunk in revision 7529

Actions

Also available in: Atom PDF