added more specific exceptions

This commit is contained in:
Sheldan
2020-05-13 23:46:58 +02:00
parent cf04687f04
commit b591ae497d
12 changed files with 134 additions and 20 deletions

View File

@@ -0,0 +1,27 @@
package dev.sheldan.abstracto.core.exception;
import dev.sheldan.abstracto.templating.Templatable;
import java.util.HashMap;
public class UserInServerNotFoundException extends AbstractoRunTimeException implements Templatable {
private Long userInServerId;
public UserInServerNotFoundException(Long userInServerId) {
super("");
this.userInServerId = userInServerId;
}
@Override
public String getTemplateName() {
return "core_user_in_server_not_found_exception";
}
@Override
public Object getTemplateModel() {
HashMap<String, Long> param = new HashMap<>();
param.put("userInServerId", this.userInServerId);
return param;
}
}