From c266b8017b88edb395e1935054d84dd77ac4ed68 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 20 May 2014 21:22:44 +0200 Subject: Make ReedSolomon exception more verbose --- src/ReedSolomon.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 +#include #include // For galois.h ... #include // 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()); } } -- cgit v1.2.3