aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/server/exceptions/HandlerSetupFailureException.java
blob: d301eaccc12a2379f58542c5e23755df0d4792b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
 * 
 */
package uk.org.ury.server.exceptions;

/**
 * Exception thrown when the server request handler requested 
 * by the client cannot be set up to process the request.
 * 
 * @author Matt Windsor
 */

public class HandlerSetupFailureException extends HandlingException
{
  
  /**
   * TODO: Change this!  ---v
   */
  
  private static final long serialVersionUID = -397479334359858162L;

  
  /**
   * Construct a new HandlerNotFoundException with a 
   * default reason.
   */
  
  public
  HandlerSetupFailureException ()
  {
    super ("Handler setup failed.");
  }
  
  
  /**
   * Construct a new HandlerSetupFailureException with a class name 
   * and chained exception.
   * 
   * Use this to hide exception specifics from higher abstraction
   * layers.
   * 
   * @param className  The name of the failed handler class.
   * 
   * @param cause      The exception that this new exception is to 
   *                   wrap.
   */
  
  public
  HandlerSetupFailureException (String className, 
                                Throwable cause)
  {
    super ("Setup for handler " + className + " failed (reason: "
           + cause.getMessage () + ").", cause);
  }
}