fun.fengwk.convention4j.api.code.ImmutableConventionErrorCode Maven / Gradle / Ivy
package fun.fengwk.convention4j.api.code;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.io.Serial;
import java.util.Collections;
import java.util.Map;
/**
* @author fengwk
*/
@EqualsAndHashCode
@ToString
public class ImmutableConventionErrorCode extends ImmutableConventionCode implements ConventionErrorCode {
@Serial
private static final long serialVersionUID = 1L;
private final Map errorContext;
public ImmutableConventionErrorCode(int status, String code, String message, Map errorContext) {
super(status, code, message);
this.errorContext = errorContext == null ? Collections.emptyMap() : errorContext;
}
@Override
public Map getErrorContext() {
return errorContext;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy