Java 类edu.wpi.first.wpilibj.util.UncleanStatusException 实例源码

项目:snobot-2017    文件:CANExceptionFactory.java   
@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));
  }
}
项目:Frc2016FirstStronghold    文件:CANExceptionFactory.java   
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));
  }
}
项目:wpilibj    文件:CANExceptionFactory.java   
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));
    }
}
项目:wpilib-java    文件:CANExceptionFactory.java   
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));
    }
}