All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xbill.DNS.utils.json.exception.BaseJsonException Maven / Gradle / Ivy

There is a newer version: 1.1.8-r1685
Show newest version
package org.xbill.DNS.utils.json.exception;

/**
 * Base class for all JSON serialization and deserialization exceptions.
 * @author Arnaud Dumont
 */
public class BaseJsonException extends RuntimeException {
    private static final long serialVersionUID = 2875767802768799014L;

    private final Enum exceptionCode;
    private final Object[] objects;

    public BaseJsonException(final Enum exceptionCode, final Object[] objects) {
        super(exceptionCode.name());
        this.exceptionCode = exceptionCode;
        this.objects = objects;
    }

    public BaseJsonException(final Enum exceptionCode, final Throwable cause, final Object[] objects) {
        super(exceptionCode.name(), cause);
        this.objects = objects;
        this.exceptionCode = exceptionCode;
    }

    public Enum getExceptionCode() {
        return exceptionCode;
    }

    public Object[] getObjects() {
        return objects;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy