CCF
Loading...
Searching...
No Matches
rpc_exception.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "ccf/odata_error.h"
6
7#include <exception>
8#include <string>
9
10namespace ccf
11{
12 struct RpcException : public std::exception
13 {
15
17 ccf::http_status status, const std::string& code, std::string&& msg) :
18 error{status, code, std::move(msg)}
19 {}
20
21 const char* what() const throw() override
22 {
23 return error.msg.c_str();
24 }
25 };
26}
Definition app_interface.h:14
llhttp_status http_status
Definition http_status.h:9
STL namespace.
Definition odata_error.h:58
std::string msg
Definition odata_error.h:61
Definition rpc_exception.h:13
RpcException(ccf::http_status status, const std::string &code, std::string &&msg)
Definition rpc_exception.h:16
ErrorDetails error
Definition rpc_exception.h:14
const char * what() const override
Definition rpc_exception.h:21