Attempt to support invites, working in progress
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
package io.kamax.mxisd.exception;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class ConfigurationException extends RuntimeException {
|
||||
|
||||
private String key;
|
||||
private String detailedMsg;
|
||||
|
||||
public ConfigurationException(String key) {
|
||||
super("Invalid or empty value for configuration key " + key);
|
||||
}
|
||||
|
||||
public ConfigurationException(Throwable t) {
|
||||
super(t.getMessage(), t);
|
||||
}
|
||||
|
||||
public ConfigurationException(String key, String detailedMsg) {
|
||||
this(key);
|
||||
this.detailedMsg = detailedMsg;
|
||||
}
|
||||
|
||||
public Optional<String> getDetailedMessage() {
|
||||
return Optional.ofNullable(detailedMsg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package io.kamax.mxisd.exception;
|
||||
|
||||
public class MappingAlreadyExistsException extends RuntimeException {
|
||||
|
||||
public MappingAlreadyExistsException() {
|
||||
super("A mapping already exists for this 3PID");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user