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

org.telegram.bot.GenericErrorTelegramFunctionCallback Maven / Gradle / Ivy

There is a newer version: 66.2
Show newest version
package org.telegram.bot;

import org.telegram.api.engine.RpcException;
import org.telegram.api.engine.TimeoutException;
import org.telegram.tl.TLObject;

/**
 * @author Ruben Bermudez
 * @version 1.0
 * @brief Callback to execute telegram api method
 * @date 26 of September of 2015
 */
public abstract class GenericErrorTelegramFunctionCallback implements TelegramFunctionCallback {
    @Override
    public void onRpcError(RpcException e) {
        onError(e);
    }

    @Override
    public void onTimeout(TimeoutException e) {
        onError(e);
    }

    @Override
    public void onUnknownError(Throwable e) {
        onError(e);
    }

    public abstract void onError(Throwable e);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy