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

io.deephaven.proto.util.Exceptions Maven / Gradle / Ivy

The newest version!
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.proto.util;

import com.google.rpc.Code;
import com.google.rpc.Status;
import io.grpc.StatusRuntimeException;
import io.grpc.protobuf.StatusProto;

public class Exceptions {
    public static StatusRuntimeException statusRuntimeException(final Code statusCode,
            final String details) {
        return StatusProto.toStatusRuntimeException(
                Status.newBuilder().setCode(statusCode.getNumber()).setMessage(details).build());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy