diff options
Diffstat (limited to 'src/ReedSolomon.cpp')
-rw-r--r-- | src/ReedSolomon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ReedSolomon.cpp b/src/ReedSolomon.cpp index 0989e17..5239a8f 100644 --- a/src/ReedSolomon.cpp +++ b/src/ReedSolomon.cpp @@ -20,6 +20,7 @@ */ #include "ReedSolomon.h" +#include <stdexcept> #include <stdio.h> // For galois.h ... #include <string.h> // For memcpy @@ -46,8 +47,7 @@ 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) { - fprintf(stderr, "ERROR: Invalid Reed Solomon parameters!\n"); - abort(); + throw std::invalid_argument("Invalid Reed-Solomon parameters!"); } } |