PhidgetException.java
Go to the documentation of this file.
00001 /*
00002  * Copyright 2012 Phidgets Inc.  All rights reserved.
00003  */
00004 
00005 package com.phidgets;
00006 
00014 public class PhidgetException extends java.lang.Exception {
00015         private int errno;
00016         private String description;
00017 
00022         public PhidgetException(int errno, String description) {
00023                 this.description = description;
00024                 this.errno = errno;
00025         }
00026 
00034         public static final int EPHIDGET_NOTFOUND = 1;
00042         public static final int EPHIDGET_NOMEMORY = 2;
00051         public static final int EPHIDGET_UNEXPECTED = 3;
00059         public static final int EPHIDGET_INVALIDARG = 4;
00068         public static final int EPHIDGET_NOTATTACHED = 5;
00076         public static final int EPHIDGET_INTERRUPTED = 6;
00084         public static final int EPHIDGET_INVALID = 7;
00093         public static final int EPHIDGET_NETWORK = 8;
00106         public static final int EPHIDGET_UNKNOWNVAL = 9;
00114         public static final int EPHIDGET_BADPASSWORD = 10;
00124         public static final int EPHIDGET_UNSUPPORTED = 11;
00132         public static final int EPHIDGET_DUPLICATE = 12;
00141         public static final int EPHIDGET_TIMEOUT = 13;
00149         public static final int EPHIDGET_OUTOFBOUNDS = 14;
00157         public static final int EPHIDGET_EVENT = 15;
00165         public static final int EPHIDGET_NETWORK_NOTCONNECTED = 16;
00173         public static final int EPHIDGET_WRONGDEVICE = 17;
00181         public static final int EPHIDGET_CLOSED = 18;
00189         public static final int EPHIDGET_BADVERSION = 19;
00190 
00191 
00192         //Error Event codes
00193 
00201         public static final int EEPHIDGET_NETWORK = 0x8001;
00209         public static final int EEPHIDGET_BADPASSWORD = 0x8002;
00217         public static final int EEPHIDGET_BADVERSION = 0x8003;
00225         public static final int EEPHIDGET_OVERRUN = 0x9002;
00233         public static final int EEPHIDGET_PACKETLOST = 0x9003;
00241         public static final int EEPHIDGET_WRAP = 0x9004;
00249         public static final int EEPHIDGET_OVERTEMP = 0x9005;
00257         public static final int EEPHIDGET_OVERCURRENT = 0x9006;
00265         public static final int EEPHIDGET_OUTOFRANGE = 0x9007;
00273         public static final int EEPHIDGET_BADPOWER = 0x9008;
00274 
00315         public int getErrorNumber() {
00316                 return errno;
00317         }
00318 
00325         public String getDescription() {
00326                 return description;
00327         }
00328 
00334         public String toString() {
00335                 return "PhidgetException " + errno + " (" + description + ")";
00336         }
00337 }


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:21