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 package org.apache.commons.httpclient;
32
33 /***
34 * Signals violation of HTTP specification caused by an invalid redirect
35 * location
36 *
37 * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
38 *
39 * @since 3.1
40 */
41 public class InvalidRedirectLocationException extends RedirectException {
42
43 private final String location;
44
45 /***
46 * Creates a new InvalidRedirectLocationException with the specified detail message.
47 *
48 * @param message the exception detail message
49 * @param location redirect location
50 */
51 public InvalidRedirectLocationException(final String message, final String location) {
52 super(message);
53 this.location = location;
54 }
55
56 /***
57 * Creates a new RedirectException with the specified detail message and cause.
58 *
59 * @param message the exception detail message
60 * @param location redirect location
61 * @param cause the <tt>Throwable</tt> that caused this exception, or <tt>null</tt>
62 * if the cause is unavailable, unknown, or not a <tt>Throwable</tt>
63 */
64 public InvalidRedirectLocationException(final String message, final String location,
65 final Throwable cause) {
66 super(message, cause);
67 this.location = location;
68 }
69
70 public String getLocation() {
71 return this.location;
72 }
73
74 }