[
https://issues.apache.org/jira/browse/WICKET-3078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914856#action_12914856
]
Hudson commented on WICKET-3078:
--------------------------------
Integrated in Apache Wicket 1.5.x #362 (See
[https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/362/])
WICKET-3078 FileUploadException is masked behind WicketRuntimeException and
not handled by a Form
Cleanup UploadWebRequest.
> FileUploadException is masked behind WicketRuntimeException and not handled
> by a Form
> -------------------------------------------------------------------------------------
>
> Key: WICKET-3078
> URL: https://issues.apache.org/jira/browse/WICKET-3078
> Project: Wicket
> Issue Type: Bug
> Components: wicket, wicket-extensions
> Affects Versions: 1.5-M2.1
> Environment: Widnows, Jetty 7
> Reporter: Ivan Vasilev
> Assignee: Martin Grigorov
> Fix For: 1.5-M3
>
>
> I have a org.apache.wicket.markup.html.form.Form fileUploadForm, which has:
> fileUploadForm.setMultiPart(true);
> fileUploadForm.setMaxSize(Bytes.kilobytes(150));
> When the form is submitted with a file larger than 150K the following methods
> are called:
> fileUploadForm -> handleMultiPart ->
> ServletWebRequest.newMultipartWebRequest((Bytes maxsize) and inside it
> try
> {
> return new MultipartRequest(getHttpServletRequest(),
> getFilterPrefix(), maxsize);
> }
> catch (FileUploadException e)
> {
> throw new WicketRuntimeException(e);
> }
> When the file size exceeds the maximum allowed a FileUploadException is
> thrown, however it is immediately caught and "masked" in a
> WicketRuntimeException. Inside the handleMultiPart method of the Form there
> is a catch block for FileUploadException, but the original exception is no
> longer of type FileUploadException and in this case the form fails to handle
> it. The result is that instead of an error message informing the user of
> exceeded limit a wicket stack trace page is displayed.
> I'm not sure if this is part of wicket or wicket-extensions, because it
> involves classes from the both modules.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.