if (uploadException != null)
{
Component page = componentSource.getPage(parameters.getActivePageName());
ComponentResultProcessorWrapper callback = new ComponentResultProcessorWrapper(resultProcessor);
page.getComponentResources().triggerEvent(UploadEvents.UPLOAD_EXCEPTION, new Object[] {uploadException},
callback);
// If an event handler exists and returns a value, then the callback will be aborted and a response
// (typically a redirect) will already have been sent to the client.
if (callback.isAborted()) return;
// If the page does not properly handle the exception, then we throw it now.
throw new RuntimeException(UploadMessages.unableToDecode(), uploadException);
}