Project

General

Profile

Revision aebcfdfe

IDaebcfdfe50f3129a615bea99eb1f92a771343ce4
Parent 538322d1
Child a1ac8acd

Added by Andreas Kohlbecker over 2 years ago

ref #7269 ExternalServiceException more detailed information

View differences:

cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/common/ExternalServiceException.java
18 18

  
19 19
    private static final long serialVersionUID = -7609872610682674127L;
20 20

  
21
    String problem = "";
21 22
    String externalService;
22 23

  
23 24
    /**
24 25
     * @param message
25 26
     * @param cause
26 27
     */
27
    public ExternalServiceException(String externalService, String message, Throwable cause) {
28
        super(message, cause);
28
    public ExternalServiceException(String externalService, String problem, Throwable cause) {
29
        super(cause);
30
        this.problem = problem;
29 31
        this.externalService = externalService;
30 32
    }
31 33

  
......
34 36
     */
35 37
    public ExternalServiceException(String externalService, Throwable cause) {
36 38
        super(cause);
39
        problem = cause.getMessage();
37 40
        this.externalService = externalService;
38 41
    }
39 42

  
......
41 44
     * @param preference
42 45
     * @param message
43 46
     */
44
    public ExternalServiceException(String externalService, String message) {
45
        super(message);
47
    public ExternalServiceException(String externalService, String problem) {
48
        this.problem = problem;
46 49
        this.externalService = externalService;
47 50
    }
48 51

  
......
51 54
     */
52 55
    @Override
53 56
    public String getMessage() {
54
        return externalService + ": " + super.getMessage();
57
        return externalService + ": " + problem;
55 58
    }
56 59

  
57 60
    /**
......
59 62
     */
60 63
    @Override
61 64
    public String getLocalizedMessage() {
62
        return externalService + ": " + super.getLocalizedMessage();
65
        return getMessage();
66
    }
67

  
68
    /**
69
     * @return the problem
70
     */
71
    public String getProblem() {
72
        return problem;
63 73
    }
64 74

  
75
    /**
76
     * @return the externalService
77
     */
78
    public String getExternalService() {
79
        return externalService;
80
    }
81

  
82

  
65 83

  
66 84

  
67 85

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)