joe78781178 / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

doPost() in UploadAction doesn't render errors correctly #194

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Perform an upload that throws an exception.
2.In IE 9, 8 the XML doesn't get back to the innerHTML element resulting in a 
NullPointerException on the client side.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Version 1.0

Please provide any additional information below.
Examine the renderXmlResponse calls in doPost() in the UploadAction class.  All 
calls to this method to renderXmlResponse in doPost must have the true argument 
to tell the renderer that this is a post request.  It does it correctly if 
there are no errors.

Oh, and while you are looking at this code, it would be nice if you could fix 
the following too.  Assume for a second that the executeAtion call throws a 
NullPointerException.  The message of a NullPointerException is null.  The 
exception is caught, the message extracted and placed in the error string, and 
what follows is a test on that message for null.  The logic here assumes that 
if there was an exception thrown, the error string will be non-null.  As a 
result, any NullPointerException will be returned to the client as a success 
response. 

Original issue reported on code.google.com by jjka...@gmail.com on 19 Mar 2014 at 9:31

GoogleCodeExporter commented 9 years ago
Since you have analysed the code, could you send a patch?, maybe cloning 
https://github.com/manolo/gwtupload and sending a pull request

Thanks for reporting

Original comment by manuel.carrasco.m on 2 Apr 2014 at 8:32

GoogleCodeExporter commented 9 years ago
Could you help to fix this with a patch?

Thanks

Original comment by manuel.carrasco.m on 7 Jan 2015 at 5:54