You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoffrey Wiseman <ge...@gmail.com> on 2009/04/03 22:40:57 UTC

Error Handling in a Component

I'm sure there's a standard way to do this, but I haven't found the right
search criteria to find out what it is -- if I've got a component where the
parameters are not valid, what's the normal Tapestry approach for addressing
this?  I could render an error, but in this case it's likely to be a
programming error and I'd rather trigger an overall page rendering failure.

   - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Re: Error Handling in a Component

Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Sat, Apr 4, 2009 at 1:04 PM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> Em Fri, 03 Apr 2009 17:40:57 -0300, Geoffrey Wiseman <
> geoffrey.wiseman@gmail.com> escreveu:
>
>  I'm sure there's a standard way to do this, but I haven't found the right
>> search criteria to find out what it is -- if I've got a component where
>> the parameters are not valid, what's the normal Tapestry approach for
>> addressing this?  I could render an error, but in this case it's likely to
>> be a
>> programming error and I'd rather trigger an overall page rendering
>> failure.
>>
>
> Why don't you just throw an exception?
>

Yes, I was reading /something/ in the Tapestry docs last night about how
exceptions are handled -- looks like that's the natural approach, and
doesn't matter what kind of exception I want to throw -- or, possibly, which
method in the component lifecycle I throw it from.

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Re: Error Handling in a Component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Fri, 03 Apr 2009 17:40:57 -0300, Geoffrey Wiseman  
<ge...@gmail.com> escreveu:

> I'm sure there's a standard way to do this, but I haven't found the right
> search criteria to find out what it is -- if I've got a component where  
> the parameters are not valid, what's the normal Tapestry approach for  
> addressing this?  I could render an error, but in this case it's likely  
> to be a
> programming error and I'd rather trigger an overall page rendering  
> failure.

Why don't you just throw an exception?

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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