commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Kohll - Mailing Lists <oliver.li...@gtwm.co.uk>
Subject FileItem.write raw exception
Date Mon, 16 Apr 2012 16:08:07 GMT
Hello,

FileItem.write throws a raw java.lang.Exception:

http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/FileItem.html#write(java.io.File)

which I believe is bad practice - clients must catch any RuntimeException and also the API
provides no info about which type of non-runtime exceptions may be generated. It certainly
feels bad coding against it.

I know fixing this would be an API change, but it would be backwards compatible.

Or is there a good reason for throwing the raw exception?

Regards
Oliver Kohll



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message