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

com.sap.cloud.sdk.s4hana.connectivity.exception.QueryExecutionException Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
 */

package com.sap.cloud.sdk.s4hana.connectivity.exception;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.sap.cloud.sdk.cloudplatform.servlet.response.QueryExecutionErrorResponse;
import com.sap.cloud.sdk.cloudplatform.servlet.response.ResponseWithErrorCode;
import com.sap.cloud.sdk.cloudplatform.servlet.response.WithErrorResponse;

import lombok.NoArgsConstructor;

/**
 * Thrown when something goes wrong during the execution of a query.
 */
@NoArgsConstructor
public class QueryExecutionException extends Exception implements WithErrorResponse
{
    private static final long serialVersionUID = 1407979994822578835L;

    public QueryExecutionException( @Nullable final String message )
    {
        super(message);
    }

    public QueryExecutionException( @Nullable final Throwable cause )
    {
        super(cause);
    }

    public QueryExecutionException( @Nullable final String message, @Nullable final Throwable cause )
    {
        super(message, cause);
    }

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    public ResponseWithErrorCode getErrorResponse()
    {
        return new QueryExecutionErrorResponse(getMessage());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy