30 #ifndef ELECTRONEUM_EXCEPTIONS_H
31 #define ELECTRONEUM_EXCEPTIONS_H
35 #include <boost/optional.hpp>
49 virtual const char*
what()
const throw() {
50 return reason.get().c_str();
68 virtual const char*
what()
const throw() {
69 return reason.get().c_str();
133 boost::optional<uint32_t>
code;
139 boost::optional<std::string>
message)
141 reason =
"Trezor returned failure: code="
142 + (
code ? std::to_string(
code.get()) :
"")
Definition: exceptions.hpp:73
CommunicationException()
Definition: exceptions.hpp:76
Definition: exceptions.hpp:97
DeviceAcquireException()
Definition: exceptions.hpp:100
Definition: exceptions.hpp:91
DeviceNotResponsiveException()
Definition: exceptions.hpp:94
Definition: exceptions.hpp:79
EncodingException()
Definition: exceptions.hpp:82
Definition: exceptions.hpp:85
NotConnectedException()
Definition: exceptions.hpp:88
Definition: exceptions.hpp:54
Poly1305TagInvalid()
Definition: exceptions.hpp:57
Definition: exceptions.hpp:115
ProtocolException()
Definition: exceptions.hpp:118
Definition: exceptions.hpp:41
SecurityException(std::string what)
Definition: exceptions.hpp:47
SecurityException()
Definition: exceptions.hpp:46
boost::optional< std::string > reason
Definition: exceptions.hpp:43
virtual const char * what() const
Definition: exceptions.hpp:49
Definition: exceptions.hpp:103
SessionException()
Definition: exceptions.hpp:106
Definition: exceptions.hpp:109
TimeoutException()
Definition: exceptions.hpp:112
Definition: exceptions.hpp:60
virtual const char * what() const
Definition: exceptions.hpp:68
TrezorException(std::string what)
Definition: exceptions.hpp:66
boost::optional< std::string > reason
Definition: exceptions.hpp:62
TrezorException()
Definition: exceptions.hpp:65
Definition: exceptions.hpp:153
CancelledException()
Definition: exceptions.hpp:156
Definition: exceptions.hpp:131
FailureException(boost::optional< uint32_t > code, boost::optional< std::string > message)
Definition: exceptions.hpp:138
boost::optional< std::string > message
Definition: exceptions.hpp:134
FailureException()
Definition: exceptions.hpp:137
boost::optional< uint32_t > code
Definition: exceptions.hpp:133
Definition: exceptions.hpp:183
FirmwareErrorException()
Definition: exceptions.hpp:186
Definition: exceptions.hpp:165
InvalidPinException()
Definition: exceptions.hpp:168
Definition: exceptions.hpp:171
NotEnoughFundsException()
Definition: exceptions.hpp:174
Definition: exceptions.hpp:177
NotInitializedException()
Definition: exceptions.hpp:180
Definition: exceptions.hpp:159
PinExpectedException()
Definition: exceptions.hpp:162
Definition: exceptions.hpp:125
SecurityException()
Definition: exceptions.hpp:128
Definition: exceptions.hpp:147
UnexpectedMessageException()
Definition: exceptions.hpp:150
Definition: device.cpp:38