mirror of
https://github.com/svek95/WST_Labs.git
synced 2026-06-09 23:18:27 +03:00
Add Exceptions for Lab3
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user