working on preparing journal loggin
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -8,6 +8,7 @@ import static java.lang.System.Logger.Level.ERROR;
|
||||
import static java.lang.System.Logger.Level.WARNING;
|
||||
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
|
||||
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
|
||||
import static java.text.MessageFormat.format;
|
||||
|
||||
|
||||
public class UmbrellaException extends RuntimeException{
|
||||
@@ -43,7 +44,12 @@ public class UmbrellaException extends RuntimeException{
|
||||
return new UmbrellaException(HTTP_FORBIDDEN,message,fills);
|
||||
}
|
||||
|
||||
public static UmbrellaException invalidFieldException(String field,String expected){
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return format(super.getMessage(),fills);
|
||||
}
|
||||
|
||||
public static UmbrellaException invalidFieldException(String field, String expected){
|
||||
return new UmbrellaException(HTTP_UNPROCESSABLE, ERROR_INVALID_FIELD, field, expected);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user