1 2 24 25 26 27 28 29 package com.lutris.util; 30 31 42 public class ConfigException extends KeywordValueException { 43 49 public static final int UNKNOWN = 0; 50 51 58 public static final int NOT_FOUND = 1; 59 60 67 public static final int SYNTAX = 2; 68 69 76 public static final int COUNT = 3; 77 78 85 public static final int FORMAT = 4; 86 87 93 private static final int MAX_REASON = 4; 94 95 103 public int reason; 104 105 111 public 112 ConfigException() 113 { 114 super("Unknown reason"); 115 reason = UNKNOWN; 116 } 117 118 126 public 127 ConfigException(String s) 128 { 129 super(s); 130 reason = UNKNOWN; 131 } 132 133 141 public ConfigException (Throwable cause) { 142 super (cause); 143 } 144 145 154 public ConfigException (String msg, Throwable cause) { 155 super (msg,cause); 156 } 157 158 167 public 168 ConfigException(int r, String s) 169 { 170 super(s); 171 if ((r < 0) || (r > MAX_REASON)) reason = UNKNOWN; 172 else reason = r; 173 } 174 } 175 | Popular Tags |