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

faxel.model.Try Maven / Gradle / Ivy

Go to download

Faxel is excel to java mapping library. Using handy annotations, developer no longer need to manually parse excel files.

The newest version!
package faxel.model;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import faxel.FaxelException;

class Try {
    private static Logger LOG = LoggerFactory.getLogger(SheetDefinition.class);

    static void onFailureThrowRuntimeException(Tryable r, String message, Object ... args) {
        try {
            r.tryRun();
        } catch (Throwable cause) {
            final String formattedMessage = String.format(message, args);
            LOG.error("Failed to execute Try {}. {}", cause, formattedMessage);
            throw new FaxelException(cause, formattedMessage);
        }
    }

    interface Tryable {
        void tryRun() throws Throwable;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy