1 21 22 package org.apache.derbyTesting.unitTests.services; 23 24 import org.apache.derby.iapi.error.StandardException; 25 26 29 public class T_CacheException extends T_StandardException { 30 31 public static final int ERROR = 0; 32 public static final int INVALID_KEY = 1; 33 public static final int IDENTITY_FAIL = 2; 34 35 protected int type; 36 37 38 protected T_CacheException(String message, int type) { 39 super("cache.S", message); 40 this.type = type; 41 } 42 43 public static StandardException invalidKey() { 44 return new T_CacheException("invalid key passed", INVALID_KEY); 45 } 46 public static StandardException identityFail() { 47 return new T_CacheException("identity change failed", IDENTITY_FAIL); 48 } 49 50 protected int getType() { 51 return type; 52 } 53 } 54 55 | Popular Tags |