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

com.draagon.meta.io.MetaDataIOException Maven / Gradle / Ivy

The newest version!
package com.draagon.meta.io;

import java.io.IOException;

public class MetaDataIOException extends IOException {

    public MetaDataIOException(MetaDataIO io, String msg ) {
        this( io, msg, null );
    }

    public MetaDataIOException(MetaDataIO io, String msg, Exception e ) {
        super( getPrefix( io, e ) + " " + msg, e );
    }

    protected static String getPrefix( MetaDataIO io, Exception e ) {

        // Don't write again if the wrapper one already has
        if ( e instanceof MetaDataIOException ) return "";

        return "["+io.path().getPathAndClear()+"]{writer="+ io.getClass().getSimpleName() + "," +
            "loader="  + io.getLoader().getName() + "}";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy