diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-11-05 10:52:23 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-11-05 10:52:23 +0100 |
commit | efe406d9724f959c8bc2a31802559ca6d41fd897 (patch) | |
tree | fc1c2cc742ec4871c573d7bc3d0e1f1ee20c7c98 /src | |
parent | 3254bbbf2e06e9013e8468643344683cf2783f50 (diff) | |
download | ODR-AudioEnc-efe406d9724f959c8bc2a31802559ca6d41fd897.tar.gz ODR-AudioEnc-efe406d9724f959c8bc2a31802559ca6d41fd897.tar.bz2 ODR-AudioEnc-efe406d9724f959c8bc2a31802559ca6d41fd897.zip |
Catch runtime_errors that reach main()
Diffstat (limited to 'src')
-rw-r--r-- | src/odr-audioenc.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index f4cf01e..9dd10ba 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -1523,6 +1523,12 @@ int main(int argc, char *argv[]) } } - return audio_enc.run(); + try { + return audio_enc.run(); + } + catch (const std::runtime_error& e) { + fprintf(stderr, "ODR-AudioEnc failed to start: %s\n", e.what()); + return 1; + } } |