1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sourceforge.jwebunit.exception;
20
21
22
23
24
25
26
27
28
29
30 public class TestingEngineResponseException extends RuntimeException {
31
32 private static final long serialVersionUID = 1L;
33 private int httpStatusCode = -1;
34
35
36
37
38 public TestingEngineResponseException() {
39 super();
40 }
41
42 public TestingEngineResponseException(int httpStatusCode) {
43 super();
44 this.httpStatusCode = httpStatusCode;
45 }
46
47 public TestingEngineResponseException(int httpStatusCode, String msg) {
48 super(msg);
49 this.httpStatusCode = httpStatusCode;
50 }
51
52 public TestingEngineResponseException(int httpStatusCode, String msg, Throwable ex) {
53 super(msg, ex);
54 this.httpStatusCode = httpStatusCode;
55 }
56
57 public TestingEngineResponseException(int httpStatusCode, Exception e) {
58 super("The server return "+httpStatusCode+" HTTP code.", e);
59 this.httpStatusCode = httpStatusCode;
60 }
61
62
63
64
65 public TestingEngineResponseException(String msg) {
66 super(msg);
67 }
68
69
70
71
72
73 public TestingEngineResponseException(String msg, Throwable ex) {
74 super(msg, ex);
75 }
76
77
78
79
80 public TestingEngineResponseException(Throwable ex) {
81 super(ex);
82 }
83
84
85
86
87
88
89 public int getHttpStatusCode() {
90 return httpStatusCode;
91 }
92
93 }