DataSourcePool - use IllegalArgumentException - remove need for DataSourceException

This commit is contained in:
Robin Bygrave
2015-08-02 08:54:00 +12:00
parent 032721d246
commit c526b3ef57
2 changed files with 2 additions and 26 deletions
@@ -1,24 +0,0 @@
package com.avaje.ebeaninternal.server.lib.sql;
/**
* A general DataSource exception.
*/
public class DataSourceException extends RuntimeException
{
static final long serialVersionUID = 7061559938704539844L;
public DataSourceException(Exception cause) {
super(cause);
}
public DataSourceException(String s, Exception cause) {
super(s, cause);
}
public DataSourceException(String s) {
super(s);
}
}
@@ -221,7 +221,7 @@ public class DataSourcePool implements DataSource {
try {
initialise();
} catch (SQLException ex) {
throw new DataSourceException(ex);
throw new RuntimeException(ex);
}
}
@@ -248,7 +248,7 @@ public class DataSourcePool implements DataSource {
try {
return (DataSourcePoolListener)ClassUtil.newInstance(cn, this.getClass());
} catch (Exception e) {
throw new DataSourceException(e);
throw new IllegalArgumentException(e);
}
}