use of si.ijs.acs.objectexplorer.engine.NonStickyComponentReleased in project ACS by ACS-Community.
the class BACIRemoteAccess method checkException.
/**
* @param req
* @throws Exception
*/
private void checkException(Object target, Request req) throws Exception {
Exception exceptionThrown = req.env().exception();
if (exceptionThrown != null) {
BACIRemoteNode device = getDeviceFromTarget(target);
if (device != null && device.isNonSticky() && exceptionThrown instanceof OBJECT_NOT_EXIST) {
// disconnect and provice nice error message
try {
device.disconnect();
} catch (Throwable th) {
/* noop, still report */
th.printStackTrace();
}
throw new NonStickyComponentReleased("Non-sticky component released, disconnecting it automatically.");
} else if (exceptionThrown instanceof org.omg.CORBA.UnknownUserException) {
// without ID int the CDROutputStream (value field)
Any exceptionValue = ((org.omg.CORBA.UnknownUserException) exceptionThrown).except;
java.lang.Object userException = baciIntrospector.extractAny(exceptionValue);
exceptionThrown = (Exception) userException;
}
// log ACS exception
logACSException(exceptionThrown);
throw exceptionThrown;
}
}
Aggregations