mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
DataSourcePool - use IllegalArgumentException - remove need for DataSourceException
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user