Sometimes I get exceptions like
on datasource add operations because of a duplicate primary key (generated on the server). This is by design and as these cases are rare, I’d like to handle the exception silently on the server rather than making sure this exception is not thrown at all.
I’ve read http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/docs/ErrorHandling.html but it seems like this is solely to handle errors from the client side.
In a DMI, I tried wrapping
into a try/catch block but it seems like the exception is thrown just after the DMI method is left.
What other options are there to handle (SQL) exceptions on the server in a datasource operation?
Thanks,
fatzopilot
Code:
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
I’ve read http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/docs/ErrorHandling.html but it seems like this is solely to handle errors from the client side.
In a DMI, I tried wrapping
Code:
dsRequest.execute();
What other options are there to handle (SQL) exceptions on the server in a datasource operation?
Thanks,
fatzopilot
Comment