FileUploadException wrapped in wiketRuntime exception, why? is that a good practice?

2010-07-31 Thread nicolas melendez
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?

2010-07-31 Thread Igor Vaynberg
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 nfmelen...@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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org