Add Exceptions for Lab3

This commit is contained in:
2019-04-15 16:50:05 +02:00
parent fc255e24f2
commit 3d68e1008b
4 changed files with 74 additions and 0 deletions
@@ -0,0 +1,18 @@
package Lab3.Exception;
public class CarServiceFault {
private String message;
private final static String TEMPLATE_MESSAGE = "Problem during %s operation. %s";
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public CarServiceFault(String operation, String message) {
this.message = String.format(TEMPLATE_MESSAGE, operation, message);
}
}