summaryrefslogtreecommitdiff
path: root/src/voltronic/pseudo_device.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/voltronic/pseudo_device.cc')
-rw-r--r--src/voltronic/pseudo_device.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/voltronic/pseudo_device.cc b/src/voltronic/pseudo_device.cc
index 58cd95c..2c0015e 100644
--- a/src/voltronic/pseudo_device.cc
+++ b/src/voltronic/pseudo_device.cc
@@ -8,6 +8,7 @@
#include "crc.h"
#include "hexdump/hexdump.h"
#include "../logging.h"
+#include "exceptions.h"
namespace voltronic {
@@ -26,7 +27,7 @@ static const char* response = "^D1060000,000,2300,500,0115,0018,002,500,000,000,
// set response
//static const char* response = "^1";
-// TODO: maybe move size and crc stuff to readLoop()?
+// TODO: maybe move size and crc stuff to readAll()?
size_t PseudoDevice::read(u8* buf, size_t bufSize) {
size_t pseudoResponseSize = strlen(response);
@@ -37,7 +38,7 @@ size_t PseudoDevice::read(u8* buf, size_t bufSize) {
if (responseSize + 1 > bufSize) {
std::ostringstream error;
error << "buffer is not large enough (" << (responseSize + 1) << " > " << bufSize << ")";
- throw std::overflow_error(error.str());
+ throw OverflowError(error.str());
}
memcpy(buf, response, responseSize);