RemoteCallException.java
1.06 KB
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
package it.softecspa.fileproxy.services.common;
@SuppressWarnings("serial")
public class RemoteCallException extends Throwable {
String id;
public RemoteCallException(Throwable e) {
super(ResponseOutcome.INTERNAL_SERVER_ERROR.getMessage(),e);
id = ResponseOutcome.INTERNAL_SERVER_ERROR.getReturnCode();
}
public RemoteCallException(String message, Throwable e) {
super(message, e);
id = ResponseOutcome.INTERNAL_SERVER_ERROR.getReturnCode();
}
private RemoteCallException(String id, String message) {
super(message);
this.id = id;
}
public RemoteCallException(ResponseOutcome outcome, String add_message) {
this(outcome.getReturnCode(), outcome.getMessage()+": "+add_message);
}
public RemoteCallException(ResponseOutcome outcome, Throwable e) {
super(outcome.getMessage(), e);
id = outcome.getReturnCode();
}
public RemoteCallException(ResponseOutcome outcome) {
super(outcome.getMessage());
id = outcome.getReturnCode();
}
public String getId() {
return id;
}
}