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

com.gooddata.sdk.service.dataset.DatasetException Maven / Gradle / Ivy

There is a newer version: 3.11.1+api3
Show newest version
/*
 * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved.
 * This source code is licensed under the BSD-style license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */
package com.gooddata.sdk.service.dataset;

import com.gooddata.sdk.common.GoodDataException;

import java.util.Collection;

import static java.util.Arrays.asList;

/**
 * Represents error in DatasetService
 */
public class DatasetException extends GoodDataException {

    private final Collection datasets;

    public DatasetException(String message, String dataset) {
        this(message, dataset, null);
    }

    public DatasetException(String message, String dataset, Throwable cause) {
        this(message, asList(dataset), cause);
    }

    public DatasetException(String message, Collection datasets, Throwable cause) {
        super("Load datasets " + datasets + " failed: " + message, cause);
        this.datasets = datasets;
    }

    public DatasetException(String message, Collection datasets) {
        this(message, datasets, null);
    }

    /**
     * Get datasets.
     * @return dataset names
     */
    public Collection getDatasets() {
        return datasets;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy