I was having uncaught exceptions with the logger so I narrowed down the
test just a non-existent table. In essence, yes, I was just trying to
see what happens.
Everything works as you describe. In bootstrap, error is not caught.
In application, it is caught and error is displayed.
I saw that the dispatch loop is processed within a try/catch block, so
that pretty much explains everything.
Thanks so much for the time and explanation!
Arthur
Matthew Weier O'Phinney wrote:
-- Arthur M. Kang <[EMAIL PROTECTED]> wrote
(on Thursday, 14 February 2008, 10:52 AM -0800):
I am using a Db backend (pdo type with postgres db). The db connector is
valid. Logger is setup correctly. Everything works fine and log messages get
logged correct.
Then, I purposely change the second parameter to Log_Writer_Db to a
non-existent table. I would expect the exception to get caught, but that is
where I am having this issue. I get, with no further output:
Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with message
'SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "asdf" does not exist' in
First, is this within your bootstrap, or within application code? If
you're not doing this within your application controllers, there's no
way this will be caught so you can render an error page.
Second, why are you setting it to a non-existent table in the first
place? Just to see what happens?
Matthew Weier O'Phinney wrote:
-- Arthur M. Kang <[EMAIL PROTECTED]> wrote
(on Thursday, 14 February 2008, 02:50 AM -0800):
Thanks for the reply. That clears it up a little.
As for the logger...This is the error I get no matter where I put the
test. In
the bootstrap or in an action controller. The exception is not caught
or there
are multiple throws...
Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with
message
'SQLSTATE[42703]: Undefined column: 7 ERROR: column "test" of
relation...
It's unclear what backend you're using for the logger, but my guess,
based on the fact that this occurs when you all $log->warn('test'), is
that you're using a DB backend.
The error message above is telling *me* that you're not setting up
either (a) the db table or (b) the log object correctly. Because of the
nature of the error, and where it occurs, it registers as an E_FATAL,
halting execution.
Can you send the code you're using to instantiate the logger, as well as
your table schema for your log table? I'm pretty sure we can diagnose
the issue with that information.
I looked at the Zend_Log_Writer_Abstract file and in the write method,
it says
'// exception occurs on error'. What does that mean? Is the logger
supposed
to fail on error?
$log->warn('test') with incorrect event items causes fatal
error everywhere
Is the fatal error caused by an uncaught exception, or is it just a
fatal error?