[Lift] Re: error page

2008-10-02 Thread Marius

Hi,

Please see LiftRules.browserResponseToException ... this is called
when an exception is thrown from the application. Here you can
"intercept" the Throwable and redirect to your own error page  using
RedirectResponse or RedirectWithState.

Br's,
Marius

On Oct 2, 10:48 am, Oliver <[EMAIL PROTECTED]> wrote:
> I don't want to display the default error page to the user. How do I replace
> it with my own?
>
> cheers
> Oliver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-02 Thread Marius

Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
browserResponseToException  is ultimately called by
logAndReturnExceptionToBrowser

On Oct 2, 10:59 am, Marius <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Please see LiftRules.browserResponseToException ... this is called
> when an exception is thrown from the application. Here you can
> "intercept" the Throwable and redirect to your own error page  using
> RedirectResponse or RedirectWithState.
>
> Br's,
> Marius
>
> On Oct 2, 10:48 am, Oliver <[EMAIL PROTECTED]> wrote:
>
> > I don't want to display the default error page to the user. How do I replace
> > it with my own?
>
> > cheers
> > Oliver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-02 Thread Oliver Lambert

I tried

 LiftRules.logAndReturnExceptionToBrowser = {
   case (request, e) => println("what is going on");  
RedirectResponse("/")
   case _ => println("whatis going on 2"); RedirectResponse("/")
 }

No change in behavior

On 02/10/2008, at 6:03 PM, Marius wrote:

>
> Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
> browserResponseToException  is ultimately called by
> logAndReturnExceptionToBrowser
>
> On Oct 2, 10:59 am, Marius <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> Please see LiftRules.browserResponseToException ... this is called
>> when an exception is thrown from the application. Here you can
>> "intercept" the Throwable and redirect to your own error page  using
>> RedirectResponse or RedirectWithState.
>>
>> Br's,
>> Marius
>>
>> On Oct 2, 10:48 am, Oliver <[EMAIL PROTECTED]> wrote:
>>
>>> I don't want to display the default error page to the user. How do  
>>> I replace
>>> it with my own?
>>
>>> cheers
>>> Oliver
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-02 Thread TylerWeir

Hey Oliver,

I dropped this in:
  LiftRules.logAndReturnExceptionToBrowser = {
case (request, e) => println("what is going on");
RedirectResponse("/");
 }

and wrote some jank code to force an exception and it's working as
expected.

What output are you not getting?



On Oct 2, 7:22 am, Oliver Lambert <[EMAIL PROTECTED]> wrote:
> I tried
>
>      LiftRules.logAndReturnExceptionToBrowser = {
>        case (request, e) => println("what is going on");  
> RedirectResponse("/")
>        case _ => println("whatis going on 2"); RedirectResponse("/")
>      }
>
> No change in behavior
>
> On 02/10/2008, at 6:03 PM, Marius wrote:
>
>
>
> > Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
> > browserResponseToException  is ultimately called by
> > logAndReturnExceptionToBrowser
>
> > On Oct 2, 10:59 am, Marius <[EMAIL PROTECTED]> wrote:
> >> Hi,
>
> >> Please see LiftRules.browserResponseToException ... this is called
> >> when an exception is thrown from the application. Here you can
> >> "intercept" the Throwable and redirect to your own error page  using
> >> RedirectResponse or RedirectWithState.
>
> >> Br's,
> >> Marius
>
> >> On Oct 2, 10:48 am, Oliver <[EMAIL PROTECTED]> wrote:
>
> >>> I don't want to display the default error page to the user. How do  
> >>> I replace
> >>> it with my own?
>
> >>> cheers
> >>> Oliver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-02 Thread Tim Perrett

On this subject - I remember some time back we were discussing lift
run levels and potentially different errors / levels of logging for
different run levels. Did this ever come about?

Cheers, Tim

On Oct 2, 3:03 pm, TylerWeir <[EMAIL PROTECTED]> wrote:
> Hey Oliver,
>
> I dropped this in:
>       LiftRules.logAndReturnExceptionToBrowser = {
>         case (request, e) => println("what is going on");
> RedirectResponse("/");
>      }
>
> and wrote some jank code to force an exception and it's working as
> expected.
>
> What output are you not getting?
>
> On Oct 2, 7:22 am, Oliver Lambert <[EMAIL PROTECTED]> wrote:
>
> > I tried
>
> >      LiftRules.logAndReturnExceptionToBrowser = {
> >        case (request, e) => println("what is going on");  
> > RedirectResponse("/")
> >        case _ => println("whatis going on 2"); RedirectResponse("/")
> >      }
>
> > No change in behavior
>
> > On 02/10/2008, at 6:03 PM, Marius wrote:
>
> > > Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
> > > browserResponseToException  is ultimately called by
> > > logAndReturnExceptionToBrowser
>
> > > On Oct 2, 10:59 am, Marius <[EMAIL PROTECTED]> wrote:
> > >> Hi,
>
> > >> Please see LiftRules.browserResponseToException ... this is called
> > >> when an exception is thrown from the application. Here you can
> > >> "intercept" the Throwable and redirect to your own error page  using
> > >> RedirectResponse or RedirectWithState.
>
> > >> Br's,
> > >> Marius
>
> > >> On Oct 2, 10:48 am, Oliver <[EMAIL PROTECTED]> wrote:
>
> > >>> I don't want to display the default error page to the user. How do  
> > >>> I replace
> > >>> it with my own?
>
> > >>> cheers
> > >>> Oliver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-02 Thread Marius

Yes Tim .. it's pretty much in there ... please see

var browserResponseToException: PartialFunction[(Props.RunModes.Value,
RequestState, Throwable), LiftResponse]

... or are you referring to something else?

Br's,
Marius

On Oct 2, 8:02 pm, Tim Perrett <[EMAIL PROTECTED]> wrote:
> On this subject - I remember some time back we were discussing lift
> run levels and potentially different errors / levels of logging for
> different run levels. Did this ever come about?
>
> Cheers, Tim
>
> On Oct 2, 3:03 pm, TylerWeir <[EMAIL PROTECTED]> wrote:
>
> > Hey Oliver,
>
> > I dropped this in:
> >   LiftRules.logAndReturnExceptionToBrowser = {
> > case (request, e) => println("what is going on");
> > RedirectResponse("/");
> >  }
>
> > and wrote some jank code to force an exception and it's working as
> > expected.
>
> > What output are you not getting?
>
> > On Oct 2, 7:22 am, Oliver Lambert <[EMAIL PROTECTED]> wrote:
>
> > > I tried
>
> > >  LiftRules.logAndReturnExceptionToBrowser = {
> > >case (request, e) => println("what is going on");
> > > RedirectResponse("/")
> > >case _ => println("whatis going on 2"); RedirectResponse("/")
> > >  }
>
> > > No change in behavior
>
> > > On 02/10/2008, at 6:03 PM, Marius wrote:
>
> > > > Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
> > > > browserResponseToException  is ultimately called by
> > > > logAndReturnExceptionToBrowser
>
> > > > On Oct 2, 10:59 am, Marius <[EMAIL PROTECTED]> wrote:
> > > >> Hi,
>
> > > >> Please see LiftRules.browserResponseToException ... this is called
> > > >> when an exception is thrown from the application. Here you can
> > > >> "intercept" the Throwable and redirect to your own error page  using
> > > >> RedirectResponse or RedirectWithState.
>
> > > >> Br's,
> > > >> Marius
>
> > > >> On Oct 2, 10:48 am, Oliver <[EMAIL PROTECTED]> wrote:
>
> > > >>> I don't want to display the default error page to the user. How do
> > > >>> I replace
> > > >>> it with my own?
>
> > > >>> cheers
> > > >>> Oliver
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-03 Thread Tim Perrett

Hey Marius,

Thats right, the RunModes... If you wanted to specify a different
error setup depending on the run mode, how would you do so?

Cheers

Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: error page

2008-10-03 Thread Marius

The run mode is coming from Props.mode

Br's,
Marius

On Oct 3, 2:16 pm, Tim Perrett <[EMAIL PROTECTED]> wrote:
> Hey Marius,
>
> Thats right, the RunModes... If you wanted to specify a different
> error setup depending on the run mode, how would you do so?
>
> Cheers
>
> Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---