Hi,
     I tried this filter ,but after sfException occur this email code
is not  working.Even it is not logging any constant mess in log file.



On Dec 13, 4:03 pm, Sumedh <sumedh.inam...@gmail.com> wrote:
> By the way,
> Is there a way by which I can get more details in the log file, apart
> from just the one word, sfException? :)
>
> On Dec 13, 11:02 am, Sumedh <sumedh.inam...@gmail.com> wrote:
>
> > Thanks Alexander...I think it looks like a great solution...
>
> > How much performance overheard it will be you think, for normal reqest-
> > response flow when there is no exception...? On the whole, should we
> > put something like this in production?
>
> > On Dec 12, 4:15 pm, Alexander Deruwe <ader...@aqs-carcontrol.be>
> > wrote:
>
> > > On 12 Dec 2008, at 12:11, Bernhard Schussek wrote:
>
> > > > On Fri, Dec 12, 2008 at 11:48 AM, Sumedh <sumedh.inam...@gmail.com>  
> > > > wrote:
> > > >> Looks like the plugin is available only for 1.1 ...whereas we are
> > > >> using 1.0 ... :|
> > > > The plugin has very little code and thus is easy to adapt/rewrite if
> > > > you need to. I did when there was no Doctrine version available yet,
> > > > and it took little time.
>
> > > > You should really try it. It's not hard.
>
> > > Alternatively you could use a filter:
>
> > > class ExceptionReportFilter extends sfFilter
> > > {
> > >    public function execute($filterChain)
> > >    {
> > >      // Only send mail on first call
> > >      if (!$this->isFirstCall())
> > >      {
> > >        $filterChain->execute();
>
> > >        return;
> > >      }
>
> > >      // First call handling below
> > >      try
> > >      {
> > >        $filterChain->execute();
> > >      }
> > >      catch (sfStopException $e)
> > >      {
> > >        throw $e;
> > >      }
> > >      catch (Exception $e)
> > >      {
> > >        if (SF_ENVIRONMENT == 'prod')
> > >        {
> > >          // Send mail or do whatever
> > >        }
>
> > >        // Finally, continue as normal
> > >        throw $e;
> > >      }
> > >    }
>
> > > }
>
> > > And use the filter like this in filters.yml:
>
> > > rendering: ~
> > > web_debug: ~
> > > security:  ~
>
> > > # generally, you will want to insert your own filters here
> > > exception_report:
> > >    class: ExceptionReportFilter
> > >    param:
> > >      # you might pass from/to addresses etc as parameters
>
> > > cache:     ~
> > > common:    ~
> > > flash:     ~
> > > execution: ~
>
> > > Alexander
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to