summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-07-30 19:47:14 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-07-30 19:47:14 +0200
commit37b60a6aab4abb47bb052db6fb1b49fe277e4bdc (patch)
treee9a51457bbe42682138692491b5334c5ad442f75
parent44b906ff455f26fc8ca5ff789ba2844c5e9f6061 (diff)
downloaddabmux-37b60a6aab4abb47bb052db6fb1b49fe277e4bdc.tar.gz
dabmux-37b60a6aab4abb47bb052db6fb1b49fe277e4bdc.tar.bz2
dabmux-37b60a6aab4abb47bb052db6fb1b49fe277e4bdc.zip
FIC rate_increment_ms: fail instead of using randomly chosen default value
-rw-r--r--src/fig/FIG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fig/FIG.cpp b/src/fig/FIG.cpp
index 03f7451..e064a33 100644
--- a/src/fig/FIG.cpp
+++ b/src/fig/FIG.cpp
@@ -25,6 +25,7 @@
*/
#include "FIG.h"
+#include <stdexcept>
namespace FIC {
@@ -42,7 +43,7 @@ int rate_increment_ms(FIG_rate rate)
case FIG_rate::D: return 30000;
case FIG_rate::E: return 120000;
}
- return 1000; //some default value, shouldn't be used
+ throw std::logic_error("Invalid FIG_rate");
}
} // namespace FIC