1 11 12 13 package com.sun.jmx.snmp; 14 15 16 18 19 20 30 31 public class SnmpStatusException extends Exception implements SnmpDefinitions { 32 33 34 37 public static final int noSuchName = 2 ; 38 39 42 public static final int badValue = 3 ; 43 44 47 public static final int readOnly = 4 ; 48 49 50 53 public static final int noAccess = 6 ; 54 55 58 public static final int noSuchInstance = 0xE0; 59 60 63 public static final int noSuchObject = 0xE1; 64 65 69 public SnmpStatusException(int status) { 70 errorStatus = status ; 71 } 72 73 78 public SnmpStatusException(int status, int index) { 79 errorStatus = status ; 80 errorIndex = index ; 81 } 82 83 88 public SnmpStatusException(String s) { 89 super(s); 90 } 91 92 97 public SnmpStatusException(SnmpStatusException x, int index) { 98 super(x.getMessage()); 99 errorStatus= x.errorStatus; 100 errorIndex= index; 101 } 102 103 107 public int getStatus() { 108 return errorStatus ; 109 } 110 111 116 public int getErrorIndex() { 117 return errorIndex; 118 } 119 120 121 124 128 private int errorStatus = 0 ; 129 130 135 private int errorIndex= -1; 136 137 } 138 139 140 141 | Popular Tags |