[Midas] error handling

Zach Mullen zach.mullen at kitware.com
Thu Jul 5 13:44:15 EDT 2012


If the exception is thrown as part of a controller that renders a view, the
view will be rendered as the default error view instead of the expected
view.  This default error view is different for development and production
environments.  In development mode, it just prints the error message and
stack trace instead of the view.  In production mode, a message saying
something like "an error occurred, please contact your administrator"
appears.

Throwing a Zend_Exception also adds the exception and its stack trace into
the Midas error log that is visible to server admins, regardless of the
mode.

Thanks,

Zach

On Thu, Jul 5, 2012 at 1:40 PM, Mona Wong <mona at sdsc.edu> wrote:

>
>         Is throwing a new Zend_Exception the preferred way to handle error
> situations when the user needs to be notified?  Does that function do other
> things, like log the error somewhere?
>
>         I didn't find the function definition in the source code I have so
> I wanted to double check...
>
> thanks,
> Mona
>
> *********************************************
>     Mona Wong
>     Web & iPad Application Developer
>     San Diego Supercomputer Center
>
>     "Forgive everyone everything."
>                                 -- Regina Brett
> *********************************************
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120705/b891f99e/attachment.html>


More information about the Midas mailing list