incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <n...@apache.org>
Subject ODF Simple and throws Exception
Date Thu, 18 Oct 2012 18:30:10 GMT
Hi All

Despite being a mentor of the project, rather shockingly I've only just 
tried to use ODF Toolkit in anger... Sorry!

I have some existing code which uses Apache POI to generate Excel files 
(.xls and .xlsx), which I'm trying to convert to also generate ODS ones 
too using ODF Toolkit. I'm using the Simple API to do this.

One thing that immediately struck me though was the "throws Exception" 
everywhere. In general, I'm not a big fan of needing catch(Exception e) 
in my code for things like this, as I often want to be able to tell the 
difference between an expected problem and something unusual.

Is there a reason for the general Exception throws everywhere?

Related, both Apache POI and Apache Tika, which are fairly similar 
libraries, have fairly tight throws clauses, so if there is a good 
reason for the difference it strikes me it's worth putting that on the 
website to explain why it does something different

Cheers
Nick

Mime
View raw message