DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpHardware::gRPCException Class Reference

Defines an exception caused by an operation involving the gRPC library and communication over a TCP socket. More...

+ Inheritance diagram for DynExpHardware::gRPCException:

Public Member Functions

 gRPCException (const grpc::Status Result, const std::source_location Location=std::source_location::current()) noexcept
 Constructs a gRPCException instance. More...
 
- Public Member Functions inherited from Util::Exception
 Exception (std::string Description, const ErrorType Type=ErrorType::Error, const int ErrorCode=-1, const std::source_location Location=std::source_location::current()) noexcept
 Constructs an exception. Constructor is noexcept, although std::runtime_error() might throw std::bad_alloc issuing a call to std::terminate(), which might be the best solution in that case. More...
 
virtual ~Exception ()=default
 
constexpr const char * GetErrorLabel () const
 
constexpr const char * GetErrorLabelColor () const
 

Static Private Attributes

static constexpr auto UNIMPLEMENTED_ErrorMsg = "The connected gRPC server does not implement the called gRPC stub function. Check the server configuration."
 Message used for the grpc::StatusCode::UNIMPLEMENTED status code. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Util::Exception
constexpr static const char * GetErrorLabel (const ErrorType Type)
 Converts an error type to a user-readable label for logging. More...
 
constexpr static const char * GetErrorLabelColor (const ErrorType Type)
 Converts an error type to an HTML color name for logging. More...
 
- Public Attributes inherited from Util::Exception
const ErrorType Type
 DynExp error type from Util::ErrorType More...
 
const int ErrorCode
 DynExp error code from DynExpErrorCodes::DynExpErrorCodes More...
 
const size_t Line
 Line in source code where the exception occurred. More...
 
const std::string Function
 Function in source code where the exception occurred
More...
 
const std::string File
 Source code file where the exception occurred. More...
 

Detailed Description

Defines an exception caused by an operation involving the gRPC library and communication over a TCP socket.

Definition at line 23 of file HardwareAdaptergRPC.h.

Constructor & Destructor Documentation

◆ gRPCException()

DynExpHardware::gRPCException::gRPCException ( const grpc::Status  Result,
const std::source_location  Location = std::source_location::current() 
)
noexcept

Constructs a gRPCException instance.

Parameters
ResultgRPC status code. Refer to gRPC documentation.
LocationOrigin of the exception. Refer to Util::Exception::Exception().

Definition at line 8 of file HardwareAdaptergRPC.cpp.

Member Data Documentation

◆ UNIMPLEMENTED_ErrorMsg

constexpr auto DynExpHardware::gRPCException::UNIMPLEMENTED_ErrorMsg = "The connected gRPC server does not implement the called gRPC stub function. Check the server configuration."
staticconstexprprivate

Message used for the grpc::StatusCode::UNIMPLEMENTED status code.

Definition at line 28 of file HardwareAdaptergRPC.h.


The documentation for this class was generated from the following files: