mirror of
https://github.com/svek95/WST_Labs.git
synced 2026-06-09 23:18:27 +03:00
19 lines
466 B
Java
19 lines
466 B
Java
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);
|
|
}
|
|
}
|