package de.beyondsoft.ownchat.data.api.common;

/**
 * Created by laszloffiferenc on 2/23/17.
 */
public class ErrorUtils {

    private ErrorUtils() {
    }

    public static ErrorType getErrorType(Throwable e) {
        ErrorType errorType;
        if (e instanceof ErrorThrowable) {
            errorType = ((ErrorThrowable) e).getErrorType();
        } else {
            errorType = ErrorType.UNKNOWN;
        }
        return errorType;
    }
}
