summaryrefslogtreecommitdiffstats
path: root/src/input/Edi.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-08-27 08:40:01 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-08-27 08:40:01 +0200
commit503647557aa43e8be23133f8619c6c66bfe2f470 (patch)
tree6d333044845083902a43ee422e9165a4ac75643d /src/input/Edi.cpp
parent70e72e84212f5b6b15f2e1a2b2d95d1d67abac7f (diff)
downloaddabmux-503647557aa43e8be23133f8619c6c66bfe2f470.tar.gz
dabmux-503647557aa43e8be23133f8619c6c66bfe2f470.tar.bz2
dabmux-503647557aa43e8be23133f8619c6c66bfe2f470.zip
Make InputBase::setBitrate fail with invalid_argument instead of return value
Diffstat (limited to 'src/input/Edi.cpp')
-rw-r--r--src/input/Edi.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/input/Edi.cpp b/src/input/Edi.cpp
index 58ad38b..c50c9cf 100644
--- a/src/input/Edi.cpp
+++ b/src/input/Edi.cpp
@@ -203,8 +203,7 @@ void Edi::m_run()
int Edi::setBitrate(int bitrate)
{
if (bitrate <= 0) {
- etiLog.level(error) << "Invalid bitrate (" << bitrate << ") for " << m_name;
- return -1;
+ throw invalid_argument("Invalid bitrate " + to_string(bitrate) + " for " + m_name);
}
return bitrate;