throwing exceptions from JdbcXYDataset

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Ron Warshawsky

throwing exceptions from JdbcXYDataset

Post by Ron Warshawsky » Thu Dec 19, 2002 6:00 pm

Dear Mr. Gilbert ,

Can you please add option to throw exceptions from the JdbcXYDataset when SQL query is wrong (or can not be executed by any other reason).

I am trying to add option for the user to generate custom SQL chart and below statement is falling throught:

try {
xydataset.executeQuery(customSQL );
}
catch(Exception sqle ) {
SQLExceptionDialog(sqle);
}
}

// Error: java.sql.SQLException is "never thrown" in body of corresponding try statement

Thank you,

Ron Warshawsky

Bryan

Re: throwing exceptions from JdbcXYDataset

Post by Bryan » Sun Dec 22, 2002 12:36 pm

Ron

Good suggestion. I have modified JdbcXYDataset and submitted to DG. At this stage the mod is to leave executeQuery as is, and to have another method processQuery which throws exceptions. This was done to maintain compability with existing code.

Bryan

David Gilbert

Re: throwing exceptions from JdbcXYDataset

Post by David Gilbert » Mon Dec 23, 2002 9:59 am

Hi Ron / Bryan,

Thanks Ron for the suggestion and Bryan for the code. I'll get the change incorporated for the next release.

Regards,

DG.

Ron Warshawsky

Re: throwing exceptions from JdbcXYDataset

Post by Ron Warshawsky » Tue Dec 24, 2002 10:10 am

Hello Brian and DG,

Thanks a lot for adding this functionality.

Regards,

Ron Warshawsky

Mala

Re: throwing exceptions from JdbcXYDataset

Post by Mala » Mon Jan 13, 2003 5:50 am

Hi Bryan, David,

Will this functionality be added to JdbcCategoryDataset as well?

Thanks.

Regards,

--mala--

Locked