CMSServerErrorException.java (1850B)
1 package de.openrat.client.util; 2 3 public class CMSServerErrorException extends CMSException { 4 5 private String message; 6 private String status; 7 private String description; 8 private String reason; 9 10 public CMSServerErrorException(String message, Throwable cause) 11 { 12 super(message, cause); 13 } 14 15 public CMSServerErrorException(String message, String status, String description, String reason, Throwable cause) 16 { 17 super(message, cause); 18 19 this.message = message; 20 this.status = status; 21 this.description = description; 22 this.reason = reason; 23 } 24 25 public CMSServerErrorException(String message, String status, String description, String reason) 26 { 27 super(message); 28 29 this.message = message; 30 this.status = status; 31 this.description = description; 32 this.reason = reason; 33 } 34 35 public CMSServerErrorException(String message) 36 { 37 super(message); 38 this.message = message; 39 } 40 41 public CMSServerErrorException(Throwable cause) 42 { 43 super(cause); 44 this.message = cause.getMessage(); 45 } 46 47 /** 48 * Inhalt des Feldes <code>status</code>. 49 * 50 * @return status 51 */ 52 public String getStatus() 53 { 54 return status; 55 } 56 57 /** 58 * Inhalt des Feldes <code>description</code>. 59 * 60 * @return description 61 */ 62 public String getDescription() 63 { 64 return description; 65 } 66 67 /** 68 * Inhalt des Feldes <code>reason</code>. 69 * 70 * @return reason 71 */ 72 public String getReason() 73 { 74 return reason; 75 } 76 77 @Override 78 public String getMessage() 79 { 80 String message = this.message + " - Status: " + this.status + ", Description: " + this.description + ", Reason: " + this.reason; 81 82 return message; 83 } 84 85 }