Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fatal Error Handler
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Juan Basso  
View profile  
 More options Mar 31 2012, 8:31 pm
From: Juan Basso <jrba...@gmail.com>
Date: Sat, 31 Mar 2012 20:31:18 -0400
Local: Sat, Mar 31 2012 8:31 pm
Subject: Fatal Error Handler

Hi guys,

I implemented a new handler to catch fatal errors.

code:
https://github.com/jrbasso/cakephp/compare/cakephp:2.2...2.2-fatal-error
docs: https://github.com/jrbasso/docs/compare/cakephp:2.2...2.2-fatal-error

By default it will show a page like missing something, but showing the
fatal error message, with the file and line that it happened. If debug is
disabled, it will show internal server error page.

What you think?

Juan Basso


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
euromark  
View profile  
 More options Mar 31 2012, 9:13 pm
From: euromark <dereurom...@googlemail.com>
Date: Sat, 31 Mar 2012 18:13:55 -0700 (PDT)
Local: Sat, Mar 31 2012 9:13 pm
Subject: Re: Fatal Error Handler

+1
I like it that there will be a build in fatal error handler soon.
as of right now one would have to apply some self-coded hack to catch and
log those.

I used to do it this way:

register_shutdown_function('shutdownFunction');
function shutDownFunction() { //manual logging }

Am Sonntag, 1. April 2012 02:31:18 UTC+2 schrieb Juan Basso:

Am Sonntag, 1. April 2012 02:31:18 UTC+2 schrieb Juan Basso:

Am Sonntag, 1. April 2012 02:31:18 UTC+2 schrieb Juan Basso:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
José Lorenzo Rodríguez  
View profile  
 More options Mar 31 2012, 9:33 pm
From: José Lorenzo Rodríguez <jose....@gmail.com>
Date: Sat, 31 Mar 2012 21:03:42 -0430
Local: Sat, Mar 31 2012 9:33 pm
Subject: Re: Fatal Error Handler

Nice work Juan!! I think it is ready to be merged :)

Sent from my iPhone

On 31/03/2012, at 20:01, Juan Basso <jrba...@gmail.com> wrote:

Hi guys,

I implemented a new handler to catch fatal errors.

code:
https://github.com/jrbasso/cakephp/compare/cakephp:2.2...2.2-fatal-error
docs: https://github.com/jrbasso/docs/compare/cakephp:2.2...2.2-fatal-error

By default it will show a page like missing something, but showing the
fatal error message, with the file and line that it happened. If debug is
disabled, it will show internal server error page.

What you think?

Juan Basso


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark_story  
View profile  
 More options Apr 1 2012, 1:57 pm
From: mark_story <mark.st...@gmail.com>
Date: Sun, 1 Apr 2012 10:57:54 -0700 (PDT)
Local: Sun, Apr 1 2012 1:57 pm
Subject: Re: Fatal Error Handler

Great work Juan!  I added a few comments to the docs commits.  I guess I
should better document the new console handler better as well. :)

-Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan Basso  
View profile  
 More options Apr 1 2012, 4:56 pm
From: Juan Basso <jrba...@gmail.com>
Date: Sun, 1 Apr 2012 16:56:29 -0400
Local: Sun, Apr 1 2012 4:56 pm
Subject: Re: Fatal Error Handler

Thanks! As the core.php use the same text, I also updated.

Juan Basso


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan Basso  
View profile  
 More options Apr 2 2012, 12:08 am
From: Juan Basso <jrba...@gmail.com>
Date: Mon, 2 Apr 2012 00:08:38 -0400
Local: Mon, Apr 2 2012 12:08 am
Subject: Re: Fatal Error Handler

After talk with Mark, the code was changed. I removed the
Error.fatalErrorHandler from configuration and the regular Error.handler
will receive the fatal error codes as well. The handler will define what
should be the behavior for this situation.

Code and doc updated.

Juan Basso


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ADmad  
View profile  
 More options Apr 3 2012, 3:15 pm
From: ADmad <admad.co...@gmail.com>
Date: Tue, 3 Apr 2012 12:15:25 -0700 (PDT)
Local: Tues, Apr 3 2012 3:15 pm
Subject: Re: Fatal Error Handler

On a related note in 2.2 I had updated ExceptionRenderer to use a separate
'error' layout instead of 'default' layout when rendering "safe" messages
in case of repeated errors/exceptions 0832e18e9e<https://github.com/cakephp/cakephp/commit/0832e18e9e971acdb3e7e7aab3b...> refs
#2682 <http://cakephp.lighthouseapp.com/projects/42648/tickets/2682>

Then recently I again updated it to always use 'error' layout instead of
'default' 3495422ac5<https://github.com/cakephp/cakephp/commit/3495422ac5bde8667becaa1e4af...>.
I wanted to get everyone's opinion if this is good or it should be reverted
back to using error layout only when rendering "safe" messages in case of
repeated errors.

-ADmad


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
majna  
View profile  
 More options Apr 4 2012, 10:12 am
From: majna <majna...@gmail.com>
Date: Wed, 4 Apr 2012 07:12:59 -0700 (PDT)
Local: Wed, Apr 4 2012 10:12 am
Subject: Re: Fatal Error Handler

Assuming that NotFoundException will render "error" layout with this change
in 2.2;
it is common for 404 error pages to have menus or footer like this
https://github.com/blablba
so you have to duplicate code from "default" layout in "error" layout and
you end up with same problem in case of repeated errors.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Renan Gonçalves  
View profile  
 More options Apr 4 2012, 10:47 am
From: Renan Gonçalves <renan.sad...@gmail.com>
Date: Wed, 4 Apr 2012 16:47:38 +0200
Local: Wed, Apr 4 2012 10:47 am
Subject: Re: Fatal Error Handler

Good point.
Also I don't see myself in need of a different layout in case of a error,
only if its a authentication/authorization error.

But if what you want is a "temporarily" error page, there is already
flash.ctp for it.

--
Renan Gonçalves aka renan.saddam
Software Engineer at TrueServer B.V.
CakePHP Core Developer
Website: renangoncalves dot com
Amsterdam, The Netherlands

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark_story  
View profile  
 More options Apr 4 2012, 2:40 pm
From: mark_story <mark.st...@gmail.com>
Date: Wed, 4 Apr 2012 11:40:53 -0700 (PDT)
Local: Wed, Apr 4 2012 2:40 pm
Subject: Re: Fatal Error Handler

ADmad:  I would think the error layout would only be used for repeat errors
or errors encountered when rendering an error.  Having it used for all
errors means people will put their app helpers into it.  This means that
repeat errors will continue to fail fatally.

-Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ADmad  
View profile  
 More options Apr 5 2012, 3:13 pm
From: ADmad <admad.co...@gmail.com>
Date: Thu, 5 Apr 2012 12:13:07 -0700 (PDT)
Local: Thurs, Apr 5 2012 3:13 pm
Subject: Re: Fatal Error Handler

Ok guys I will revert the change and use error layout only in
ExceptionRenderer::_outputMessageSafe() as i had initially done.

-ADmad


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ceeram  
View profile  
 More options Apr 20 2012, 3:50 am
From: Ceeram <c33...@gmail.com>
Date: Fri, 20 Apr 2012 00:50:31 -0700 (PDT)
Local: Fri, Apr 20 2012 3:50 am
Subject: Re: Fatal Error Handler

Fatal errors should also use error layout.

$helpers = array('Good', 'Bad');

when BadHelper produces fatal, the default layout will cause another error
when calling method on non-object GoodHelper, which will hide the original
fatal error. In the stack trace only i can see the FatalError handler is
starting point, not what the original fatal error was. quick fix was adding
$this->layout = 'error'; to the fatal_error.ctp view

Op donderdag 5 april 2012 21:13:07 UTC+2 schreef ADmad het volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark_story  
View profile  
 More options Apr 20 2012, 9:18 pm
From: mark_story <mark.st...@gmail.com>
Date: Fri, 20 Apr 2012 18:18:22 -0700 (PDT)
Local: Fri, Apr 20 2012 9:18 pm
Subject: Re: Fatal Error Handler

Sounds like a good idea, do you want to make that change Ceeram?

-Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ceeram  
View profile  
 More options Apr 21 2012, 4:58 am
From: Ceeram <c33...@gmail.com>
Date: Sat, 21 Apr 2012 10:58:48 +0200
Local: Sat, Apr 21 2012 4:58 am
Subject: Re: Fatal Error Handler

Sure, setting layout in the view file is ok?
Op 21 apr. 2012 03:18 schreef "mark_story" <mark.st...@gmail.com> het
volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ceeram  
View profile  
 More options Apr 21 2012, 12:04 pm
From: Ceeram <c33...@gmail.com>
Date: Sat, 21 Apr 2012 09:04:20 -0700 (PDT)
Local: Sat, Apr 21 2012 12:04 pm
Subject: Re: Fatal Error Handler

After looking again, i see error layout is in app dir only, perhaps fatal
error even use no layout to avoid other issues?

Op zaterdag 21 april 2012 10:58:48 UTC+2 schreef Ceeram het volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ADmad  
View profile  
 More options Apr 21 2012, 3:39 pm
From: ADmad <admad.co...@gmail.com>
Date: Sat, 21 Apr 2012 12:39:52 -0700 (PDT)
Local: Sat, Apr 21 2012 3:39 pm
Subject: Re: Fatal Error Handler

View class uses bake skel as fallback for files, so if you don't have error
layout in your app the one from bake skel will be used.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »