Error handle fix

This commit is contained in:
serge-rider
2020-05-01 01:51:41 +03:00
parent ef9b7eef44
commit 1446a23cbb
3 changed files with 10 additions and 2 deletions
@@ -19,6 +19,9 @@
database: {
driver="h2_embedded",
url: "jdbc:h2:${workspace}/.data/cb.h2.dat",
// For embedded database it will be the primary user name/password
user: "cb-data",
password: "cb-data",
createDatabase: true,
@@ -31,6 +31,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
@@ -100,7 +101,11 @@ public abstract class WebServiceBindingBase<API_TYPE extends DBWService> impleme
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return method.invoke(impl, args);
try {
return method.invoke(impl, args);
} catch (InvocationTargetException e) {
throw e.getTargetException();
}
}
}
}
@@ -72,7 +72,7 @@ public class WebServiceNavigator implements DBWServiceNavigator {
}
return result;
} catch (DBException e) {
throw new DBWebException("Error getting navigator nodes", e);
throw new DBWebException(e, null);
}
}