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

io.github.eliux.mega.error.MegaException Maven / Gradle / Ivy

Go to download

Java client library that works on top of MEGAcmd to provide access to the services of Mega.nz

The newest version!
package io.github.eliux.mega.error;

/**
 * Defines expected errors based on behaviours of failure defined by MEGA or the library itself.
 */
public class MegaException extends RuntimeException {

    public MegaException(String errorMessage) {
        super(errorMessage);
    }

    public MegaException(String errorMessage, Object... args) {
        super(String.format(errorMessage, args));
    }

    public MegaException(String errorMessage, Throwable errCause) {
        super(errorMessage, errCause);
    }

    public static final MegaException nonExistingEnvVariable(String envVarName) {
        return new MegaException(
                "You must define the variable %s in your environment",
                envVarName
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy