package <%= packageName %>.web.rest.errors;
<%_ if (javaVersion !== '17') { _%>
import org.zalando.problem.AbstractThrowableProblem;
import java.net.URI;
<%_ } _%>

public class CommonException extends <% if (javaVersion === '17') { %>BadRequestAlertException<% } else { %>AbstractThrowableProblem<% } %> {
    private static final long serialVersionUID = 1L;
    public CommonException(String code, String msg) {
<%_ if (javaVersion === '17') { _%>
        super(msg, "SystemInfo", code);
<%_ } else { _%>
        super(URI.create(ErrorConstants.PROBLEM_BASE_URL + "/" + code),msg);
<%_ } _%>
    }
}
