22 lines
587 B
Java
22 lines
587 B
Java
/* © SRSoftware 2024 */
|
|
package de.srsoftware.cal.db;
|
|
|
|
import de.srsoftware.tools.Error;
|
|
import java.util.Collection;
|
|
import java.util.Map;
|
|
|
|
public class NotFound<None> extends Error<None> {
|
|
public NotFound(String message, Map<String, Object> data, Collection<Exception> exceptions) {
|
|
super(message, data, exceptions);
|
|
}
|
|
|
|
public static <T> NotFound<T> of(String message, Object... fills) {
|
|
return new NotFound<>(message.formatted(fills), null, null);
|
|
}
|
|
|
|
@Override
|
|
public <NewType> NotFound<NewType> transform() {
|
|
return new NotFound<>(message(), data(), exceptions());
|
|
}
|
|
}
|