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

org.xerial.snappy.SnappyIOException Maven / Gradle / Ivy

There is a newer version: 1.1.10.7
Show newest version
package org.xerial.snappy;

import java.io.IOException;

/**
 * Enhanced IOException with SnappyErrorCode
 */
public class SnappyIOException
        extends IOException
{
    private final SnappyErrorCode errorCode;

    public SnappyIOException(SnappyErrorCode errorCode, String message)
    {
        super(message);
        this.errorCode = errorCode;
    }

    @Override
    public String getMessage()
    {
        return String.format("[%s] %s", errorCode.name(), super.getMessage());
    }

    public SnappyErrorCode getErrorCode() { return errorCode; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy