You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dmitry Gusev <dm...@gmail.com> on 2010/08/27 09:54:22 UTC

Blog post about T5 exception handling on GAE

FYI

http://dmitrygusev.blogspot.com/2010/08/gae-and-tapestry5-exception-handling.html

One thing I'd like T5 have though is something like in RemoteOnly mode in
ASP.NET.

http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx

RemoteOnly Specifies that custom errors are shown only to the remote
> clients, and that ASP.NET errors are shown to the local host. This is the
> default value.


So that even if I debug application in production mode I could get detailed
exception report and not production one.
Now I have to use development mode to debug (or consult with logs), but then
I often forgetting to switch back to production mode prior to deploy.
Can anybody share his practice of switching production mode on/off during
development cycle?

-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Re: Blog post about T5 exception handling on GAE

Posted by Dmitry Gusev <dm...@gmail.com>.
Have you looked at the link I've posted in my first message? :)

I know I can override the error page. But I like the default one. I just
don't like its default behavior which only relies on PRODUCTION_MODE
symbol.
What I suggest is to change this behavior and analyze if the user that get
this exception is a local user.
And if its a local user show him error page just like it was in
non-production mode. This is what RemoteOnly mode means in ASP.NET.

On Fri, Aug 27, 2010 at 16:19, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Fri, 27 Aug 2010 09:13:41 -0300, Dmitry Gusev <dm...@gmail.com>
> wrote:
>
>  Yes, I should say test.
>> I didn't mean running java debugger.
>> I mean trying to reproduce some test case using browser and getting
>> exception page.
>>
>
> You can override the error page (which I recommend, anyway), use the logic
> you want for showing or not the stack trace and use the ExceptionDisplay
> component to show the exception.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Re: Blog post about T5 exception handling on GAE

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 27 Aug 2010 09:13:41 -0300, Dmitry Gusev <dm...@gmail.com>  
wrote:

> Yes, I should say test.
> I didn't mean running java debugger.
> I mean trying to reproduce some test case using browser and getting
> exception page.

You can override the error page (which I recommend, anyway), use the logic  
you want for showing or not the stack trace and use the ExceptionDisplay  
component to show the exception.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Blog post about T5 exception handling on GAE

Posted by Dmitry Gusev <dm...@gmail.com>.
Yes, I should say test.
I didn't mean running java debugger.
I mean trying to reproduce some test case using browser and getting
exception page.

On Fri, Aug 27, 2010 at 16:10, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Fri, 27 Aug 2010 08:50:16 -0300, Dmitry Gusev <dm...@gmail.com>
> wrote:
>
>  There might be another issue though, what if I need to debug application
>> behavior in production mode?
>>
>
> I can't think why you cannot debug the application in production mode in
> the same way you do in non-production mode. Debugging is a JVM matter, not a
> Tapestry one.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Re: Blog post about T5 exception handling on GAE

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 27 Aug 2010 08:50:16 -0300, Dmitry Gusev <dm...@gmail.com>  
wrote:

> There might be another issue though, what if I need to debug application
> behavior in production mode?

I can't think why you cannot debug the application in production mode in  
the same way you do in non-production mode. Debugging is a JVM matter, not  
a Tapestry one.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Blog post about T5 exception handling on GAE

Posted by Dmitry Gusev <dm...@gmail.com>.
Thanks Jim, this might be a solution for most cases.

There might be another issue though, what if I need to debug application
behavior in production mode?
In this mode some services may work different way.
In this case there's no way to see detailed exception report on my
development machine.
But RemoteOnly behavior I noted before will be exactly what I wanted.

On Fri, Aug 27, 2010 at 12:31, Jim O'Callaghan <jc...@yahoo.co.uk>wrote:

> Dmitry,
>
> From an example in an earlier post on this list,  I use the approach of
> having:
>
> configuration.add(SymbolConstants.PRODUCTION_MODE, "true");
>
> in my AppModule, so that by default production mode is always set to true
> for deployments, and then for any run/debug configurations in the
> developer's IDE, just override that setting with the VM argument:
>
> -Dtapestry.production-mode=false
>
> This means you will never need to set it for a release as the default is
> "true".  Hope this helps.
>
> Regards,
> Jim.
>
> -----Original Message-----
> From: Dmitry Gusev [mailto:dmitry.gusev@gmail.com]
> Sent: 27 August 2010 08:54
> To: Tapestry users
> Subject: Blog post about T5 exception handling on GAE
>
> FYI
>
>
> http://dmitrygusev.blogspot.com/2010/08/gae-and-tapestry5-exception-handling
> .html
>
> One thing I'd like T5 have though is something like in RemoteOnly mode in
> ASP.NET.
>
> http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx
>
> RemoteOnly Specifies that custom errors are shown only to the remote
> > clients, and that ASP.NET errors are shown to the local host. This is
> the
> > default value.
>
>
> So that even if I debug application in production mode I could get detailed
> exception report and not production one.
> Now I have to use development mode to debug (or consult with logs), but
> then
> I often forgetting to switch back to production mode prior to deploy.
> Can anybody share his practice of switching production mode on/off during
> development cycle?
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

RE: Blog post about T5 exception handling on GAE

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Dmitry,

>From an example in an earlier post on this list,  I use the approach of
having:

configuration.add(SymbolConstants.PRODUCTION_MODE, "true");

in my AppModule, so that by default production mode is always set to true
for deployments, and then for any run/debug configurations in the
developer's IDE, just override that setting with the VM argument:

-Dtapestry.production-mode=false

This means you will never need to set it for a release as the default is
"true".  Hope this helps.

Regards,
Jim.

-----Original Message-----
From: Dmitry Gusev [mailto:dmitry.gusev@gmail.com] 
Sent: 27 August 2010 08:54
To: Tapestry users
Subject: Blog post about T5 exception handling on GAE

FYI

http://dmitrygusev.blogspot.com/2010/08/gae-and-tapestry5-exception-handling
.html

One thing I'd like T5 have though is something like in RemoteOnly mode in
ASP.NET.

http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx

RemoteOnly Specifies that custom errors are shown only to the remote
> clients, and that ASP.NET errors are shown to the local host. This is the
> default value.


So that even if I debug application in production mode I could get detailed
exception report and not production one.
Now I have to use development mode to debug (or consult with logs), but then
I often forgetting to switch back to production mode prior to deploy.
Can anybody share his practice of switching production mode on/off during
development cycle?

-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org