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

io.pkts.packet.sip.SipParseException Maven / Gradle / Ivy

There is a newer version: 3.0.10
Show newest version
/**
 * 
 */
package io.pkts.packet.sip;


/**
 * @author [email protected]
 */
public class SipParseException extends SipException {

    private static final long serialVersionUID = 7627471115511100108L;

    private final int errorOffset;
    private final String template;

    public SipParseException(final int errorOffset, final String message) {
        super(String.format(message, errorOffset));
        this.errorOffset = errorOffset;
        this.template = message;
    }

    public SipParseException(final String message) {
        this(0, message);
    }

    public SipParseException(final int errorOffset, final String message, final Exception cause) {
        super(String.format(message, errorOffset), cause);
        this.errorOffset = errorOffset;
        this.template = message;
    }

    public int getErrorOffset() {
        return this.errorOffset;
    }

    public String getTemplate() {
        return template;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy