1 package edu.internet2.middleware.shibboleth.hs
3 import edu.internet2.middleware.shibboleth.*;
4 import edu.internet2.middleware.shibboleth.common.*;
5 import java.util.StringTokenizer;
8 * Indicates an error with the Handle Server
10 * @author Barbara Jensen
11 * @created March 6 2002
14 public class HandleException extends Exception{
15 /** SQL failure status code */
16 public final static String SQL = "handle:SQL error";
18 /** handle failure status code */
19 public final static String ERR = "handle:general error";
21 /* will create more codes later to better handle things */
26 * Creates a new exception
28 * @param codes Zero or more dot-separated QNames
29 * @param s The error message
31 public HandleException (String codes, String msg)
37 public HandleException (String msg)
43 public String[] getCodes()
45 if (codes == null || codes.length() == 0)
47 StringTokenizer tk = new StringTokenizer(codes, ".", false);
48 int i = tk.countTokens();
49 String[] ret = new String[i];
50 for (i--; i >= 0; i--)
51 ret[i] = tk.nextToken();