errorMessage = status.getMessage(); ContextExceptionEvent cee = new ContextExceptionEvent(context, channel, DBRType.forValue(requestedDataType), requestedDataCount, dbr, errorMessage); context.notifyException(cee);
/** * @see com.cosylab.epics.caj.impl.ResponseRequest#exception(int, java.lang.String) */ public void exception(int errorCode, String errorMessage) { cancel(); // TODO no status is dispatched if (errorMessage == null) { CAStatus status = CAStatus.forStatusCode(errorCode); if (status != null) errorMessage = status.getMessage(); } ContextExceptionEvent cee = new ContextExceptionEvent(context, channel, DBRType.forValue(requestedDataType), requestedDataCount, null, errorMessage); context.notifyException(cee); /* // ... and notify if (callback != null) { CAStatus status = CAStatus.forValue(errorCode); if (status == null) status = CAStatus.PUTFAIL; context.getEventDispatcher().dispatch( new PutEvent(channel, DBRType.UNKNOWN, 0, status), callback ); } */ }
/** * @see com.cosylab.epics.caj.impl.ResponseRequest#exception(int, java.lang.String) */ public void exception(int errorCode, String errorMessage) { cancel(); // TODO no status is dispatched if (errorMessage == null) { CAStatus status = CAStatus.forStatusCode(errorCode); if (status != null) errorMessage = status.getMessage(); } ContextExceptionEvent cee = new ContextExceptionEvent(context, channel, DBRType.forValue(requestedDataType), requestedDataCount, null, errorMessage); context.notifyException(cee); /* // ... and notify if (callback != null) { CAStatus status = CAStatus.forValue(errorCode); if (status == null) status = CAStatus.PUTFAIL; context.getEventDispatcher().dispatch( new PutEvent(channel, DBRType.UNKNOWN, 0, status), callback ); } */ }
errorMessage = status.getMessage(); ContextExceptionEvent cee = new ContextExceptionEvent(context, channel, DBRType.forValue(requestedDataType), requestedDataCount, dbr, errorMessage); context.notifyException(cee);
ContextExceptionEvent cee = new ContextExceptionEvent(context, channel, DBRType.forValue(requestedDataType), requestedDataCount, null, errorMessage); context.notifyException(cee);
ContextExceptionEvent cee = new ContextExceptionEvent(context, channel, DBRType.forValue(requestedDataType), requestedDataCount, null, errorMessage); context.notifyException(cee);