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

net.snowflake.client.loader.Utils Maven / Gradle / Ivy

There is a newer version: 3.19.0
Show newest version
/*
 * Copyright (c) 2012-2017 Snowflake Computing Inc. All rights reserved.
 */
package net.snowflake.client.loader;

/**
 * Utils class for Loader API
 */
public class Utils {

    /**
     * Find the root cause of the exception
     * @param e throwable object
     * @return the thowable cause
     */
    public static Throwable getCause(Throwable e) {
        Throwable cause = null;
        Throwable result = e;

        while (null != (cause = result.getCause()) && (result != cause)) {
            result = cause;
        }
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy