mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-18 04:50:38 +00:00
added more specific exceptions
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package dev.sheldan.abstracto.modmail.exception;
|
||||
|
||||
import dev.sheldan.abstracto.core.exception.AbstractoRunTimeException;
|
||||
import dev.sheldan.abstracto.templating.Templatable;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ModMailThreadNotFoundException extends AbstractoRunTimeException implements Templatable {
|
||||
|
||||
private Long modMailThreadId;
|
||||
|
||||
public ModMailThreadNotFoundException(Long modMailThreadId) {
|
||||
super("");
|
||||
this.modMailThreadId = modMailThreadId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTemplateName() {
|
||||
return "modmail_cannot_find_modmail_thread_exception_text";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTemplateModel() {
|
||||
HashMap<String, Long> params = new HashMap<>();
|
||||
params.put("id", this.modMailThreadId);
|
||||
return params;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user