summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-10 22:49:18 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-10 22:49:18 +0100
commit50e2019c47f2a2be3c194f75aff2c088c425ef5f (patch)
tree852916836bc61d71594df974e7b6765f64f347c6 /src
parent00a75142f15d0eb8b33acb9609dc047d2a5267af (diff)
downloaddabmod-50e2019c47f2a2be3c194f75aff2c088c425ef5f.tar.gz
dabmod-50e2019c47f2a2be3c194f75aff2c088c425ef5f.tar.bz2
dabmod-50e2019c47f2a2be3c194f75aff2c088c425ef5f.zip
Make invalid subchannel size error more detailed
Diffstat (limited to 'src')
-rw-r--r--src/FrameMultiplexer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/FrameMultiplexer.cpp b/src/FrameMultiplexer.cpp
index d16ee44..1cfaadd 100644
--- a/src/FrameMultiplexer.cpp
+++ b/src/FrameMultiplexer.cpp
@@ -74,13 +74,17 @@ int FrameMultiplexer::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
const auto subchannels = m_etiSource.getSubchannels();
if (subchannels.size() != dataIn.size() - 1) {
throw std::out_of_range(
- "FrameMultiplexer detected subchannel size change!");
+ "FrameMultiplexer detected subchannel size change from " +
+ std::to_string(dataIn.size() - 1) + " to " +
+ std::to_string(subchannels.size()));
}
auto subchannel = subchannels.begin();
while (in != dataIn.end()) {
if ((*subchannel)->framesizeCu() * 8 != (*in)->getLength()) {
throw std::out_of_range(
- "FrameMultiplexer detected invalid subchannel size!");
+ "FrameMultiplexer detected invalid subchannel size! " +
+ std::to_string((*subchannel)->framesizeCu() * 8) + " != " +
+ std::to_string((*in)->getLength()));
}
size_t offset = (*subchannel)->startAddress() * 8;
memcpy(&out[offset], (*in)->getData(), (*in)->getLength());