aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-20 21:22:44 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-20 21:39:37 +0200
commitc266b8017b88edb395e1935054d84dd77ac4ed68 (patch)
tree3c2ea9411b667f7ae84fd3dbb353693a547f7728
parent7c2a94b623c4753625576d0699d95831f275fd09 (diff)
downloaddabmux-c266b8017b88edb395e1935054d84dd77ac4ed68.tar.gz
dabmux-c266b8017b88edb395e1935054d84dd77ac4ed68.tar.bz2
dabmux-c266b8017b88edb395e1935054d84dd77ac4ed68.zip
Make ReedSolomon exception more verbose
-rw-r--r--src/ReedSolomon.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ReedSolomon.cpp b/src/ReedSolomon.cpp
index 5239a8f..dbf95a8 100644
--- a/src/ReedSolomon.cpp
+++ b/src/ReedSolomon.cpp
@@ -21,6 +21,7 @@
#include "ReedSolomon.h"
#include <stdexcept>
+#include <sstream>
#include <stdio.h> // For galois.h ...
#include <string.h> // For memcpy
@@ -47,7 +48,10 @@ ReedSolomon::ReedSolomon(int N, int K, bool reverse, int gfpoly, int firstRoot,
rsData = init_rs_char(symsize, gfpoly, firstRoot, primElem, nroots, pad);
if (rsData == NULL) {
- throw std::invalid_argument("Invalid Reed-Solomon parameters!");
+ std::stringstream ss;
+ ss << "Invalid Reed-Solomon parameters! " <<
+ "N=" << N << " ; K=" << K << " ; pad=" << pad;
+ throw std::invalid_argument(ss.str());
}
}