package core.framework.impl.validate;

import core.framework.util.Strings;

import java.util.Map;

/**
 * @author neo
 */
public final class ValidationException extends RuntimeException {
    private static final long serialVersionUID = -2784801858422440222L;
    public final Map<String, String> errors;

    public ValidationException(Map<String, String> errors) {
        super(Strings.format("validation failed, error={}", errors));
        this.errors = errors;
    }
}

@@ -32,16 +32,53 @@
 idate;%0A%0A
+import core.framework.log.ErrorCode;%0A
 import c
@@ -216,16 +216,37 @@
 ception 
+implements ErrorCode 
 %7B%0A    pr
@@ -523,11 +523,99 @@
 s;%0A    %7D
+%0A%0A    @Override%0A    public String errorCode() %7B%0A        return %22VALIDATION_ERROR%22;%0A    %7D
 %0A%7D%0A

update validation exception errorCode