/* DO NOT EDIT */
/* This file was generated by Stone */

package com.dropbox.core.stone.test;

import com.dropbox.core.DbxApiException;
import com.dropbox.core.LocalizedText;

/**
 * Exception thrown when the server responds with a {@link ParentUnion} error.
 *
 * <p> This exception is raised by {@link
 * DbxTestTestRequests#testDownloadV2(UninitializedReason,String)}, {@link
 * DbxTestTestRequests#testRouteV2(String,java.util.Date)}, {@link
 * DbxTestTestRequests#testUploadV2(String,String)}, and {@link
 * DbxTestTestRequests#testUploadV3(String,String)}. </p>
 */
public class ParentUnionException extends DbxApiException {
    // exception for routes:
    //     2/test/test_download_v2
    //     2/test/test_route_v2
    //     2/test/test_upload_v2
    //     2/test/test_upload_v3

    private static final long serialVersionUID = 0L;

    /**
     * The error reported by {@link
     * DbxTestTestRequests#testDownloadV2(UninitializedReason,String)}, {@link
     * DbxTestTestRequests#testRouteV2(String,java.util.Date)}, {@link
     * DbxTestTestRequests#testUploadV2(String,String)}, and {@link
     * DbxTestTestRequests#testUploadV3(String,String)}.
     */
    public final ParentUnion errorValue;

    public ParentUnionException(String routeName, String requestId, LocalizedText userMessage, ParentUnion errorValue) {
        super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue));
        if (errorValue == null) {
            throw new NullPointerException("errorValue");
        }
        this.errorValue = errorValue;
    }
}
