You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nicolas melendez <nf...@gmail.com> on 2010/07/31 14:48:34 UTC
FileUploadException wrapped in wiketRuntime exception, why? is that a
good practice?
Hi there, i have a question about FileUploadException.
In line 80 of MultipartServletWebRequest, the constructor throws
FileUploadException which is checked, and then in line 500 of
ServletWebRequest, it was wrapped to a wickerRuntimeException,
@Override
public WebRequest newMultipartWebRequest(Bytes maxsize)
{
try
{
MultipartServletWebRequest multipart = new
MultipartServletWebRequest(
httpServletRequest, maxsize);
multipart.setRequestParameters(getRequestParameters());
return multipart;
}
catch (FileUploadException e)
{
throw new WicketRuntimeException(e);
}
}
is that a good practice?, why FileUploadException is a checked exception?
because it could be runtime exception because then it is wrapped anyway.
does anybody knows?
Thanks
NM
--
Nicolás Meléndez
Java Software Developer
1) Google App Engine works:
1.a) http://www.clasificad.com.ar (Local free classifieds for housing,
sale, services, local community, curses,jobs, and events - GAE/J + Wicket +
YUI)
1.b) http://www.chessk.com (Massive multiplayer chess online GAE/J +
Applets + Wicket)
2) Linkedin: http://ar.linkedin.com/in/nicolasmelendez
Re: FileUploadException wrapped in wiketRuntime exception, why? is
that a good practice?
Posted by Igor Vaynberg <ig...@gmail.com>.
its checked because it came from commons-upload, we didnt write it.
open a jira to create a runtime version of it and wrap it in that.
-igor
On Sat, Jul 31, 2010 at 5:48 AM, nicolas melendez <nf...@gmail.com> wrote:
> Hi there, i have a question about FileUploadException.
>
> In line 80 of MultipartServletWebRequest, the constructor throws
> FileUploadException which is checked, and then in line 500 of
> ServletWebRequest, it was wrapped to a wickerRuntimeException,
>
> @Override
> public WebRequest newMultipartWebRequest(Bytes maxsize)
> {
> try
> {
> MultipartServletWebRequest multipart = new
> MultipartServletWebRequest(
> httpServletRequest, maxsize);
> multipart.setRequestParameters(getRequestParameters());
> return multipart;
> }
> catch (FileUploadException e)
> {
> throw new WicketRuntimeException(e);
> }
> }
>
>
> is that a good practice?, why FileUploadException is a checked exception?
> because it could be runtime exception because then it is wrapped anyway.
> does anybody knows?
>
> Thanks
> NM
>
>
> --
> Nicolás Meléndez
> Java Software Developer
>
> 1) Google App Engine works:
>
> 1.a) http://www.clasificad.com.ar (Local free classifieds for housing,
> sale, services, local community, curses,jobs, and events - GAE/J + Wicket +
> YUI)
>
> 1.b) http://www.chessk.com (Massive multiplayer chess online GAE/J +
> Applets + Wicket)
>
> 2) Linkedin: http://ar.linkedin.com/in/nicolasmelendez
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org