@SuppressWarnings("JavadocMethod") public static void checkStatus(int status, int messageID) throws CANInvalidBufferException, CANMessageNotAllowedException, CANNotInitializedException, UncleanStatusException { switch (status) { case NIRioStatus.kRioStatusSuccess: // Everything is ok... don't throw. return; case ERR_CANSessionMux_InvalidBuffer: case NIRioStatus.kRIOStatusBufferInvalidSize: throw new CANInvalidBufferException(); case ERR_CANSessionMux_MessageNotFound: case NIRioStatus.kRIOStatusOperationTimedOut: throw new CANMessageNotFoundException(); case ERR_CANSessionMux_NotAllowed: case NIRioStatus.kRIOStatusFeatureNotSupported: throw new CANMessageNotAllowedException("MessageID = " + Integer.toString(messageID)); case ERR_CANSessionMux_NotInitialized: case NIRioStatus.kRIOStatusResourceNotInitialized: throw new CANNotInitializedException(); default: throw new UncleanStatusException("Fatal status code detected: " + Integer.toString( status)); } }
public static void checkStatus(int status, int messageID) throws CANInvalidBufferException, CANMessageNotAllowedException, CANNotInitializedException, UncleanStatusException { switch (status) { case NIRioStatus.kRioStatusSuccess: // Everything is ok... don't throw. return; case ERR_CANSessionMux_InvalidBuffer: case NIRioStatus.kRIOStatusBufferInvalidSize: throw new CANInvalidBufferException(); case ERR_CANSessionMux_MessageNotFound: case NIRioStatus.kRIOStatusOperationTimedOut: throw new CANMessageNotFoundException(); case ERR_CANSessionMux_NotAllowed: case NIRioStatus.kRIOStatusFeatureNotSupported: throw new CANMessageNotAllowedException("MessageID = " + Integer.toString(messageID)); case ERR_CANSessionMux_NotInitialized: case NIRioStatus.kRIOStatusResourceNotInitialized: throw new CANNotInitializedException(); default: throw new UncleanStatusException("Fatal status code detected: " + Integer.toString(status)); } }
public static void checkStatus(int status, int messageID) throws CANInvalidBufferException, CANTimeoutException, CANMessageNotAllowedException, CANNotInitializedException, UncleanStatusException { switch (status) { case NiRioStatus.kRioStatusSuccess: // Everything is ok... don't throw. return; case ERR_JaguarCANDriver_InvalidBuffer: case NiRioStatus.kRIOStatusBufferInvalidSize: throw new CANInvalidBufferException(); case ERR_JaguarCANDriver_TimedOut: case NiRioStatus.kRIOStatusOperationTimedOut: throw new CANTimeoutException(); case ERR_JaguarCANDriver_NotAllowed: case NiRioStatus.kRIOStatusFeatureNotSupported: throw new CANMessageNotAllowedException("MessageID = " + Integer.toString(messageID)); case ERR_JaguarCANDriver_NotInitialized: case NiRioStatus.kRIOStatusResourceNotInitialized: throw new CANNotInitializedException(); default: throw new UncleanStatusException("Fatal status code detected: " + Integer.toString(status)); } }