diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-21 16:40:08 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-21 16:40:08 +0100 |
commit | de472d4b7f674cd24c4dafa30ca42bd73665e4f8 (patch) | |
tree | 794f35bddbd6c49984c2885a10f76a311ded75ff /src/fig/FIG0_2.cpp | |
parent | 9b5dad36648022a1d78f4060a30edc0fb8e32001 (diff) | |
download | dabmux-de472d4b7f674cd24c4dafa30ca42bd73665e4f8.tar.gz dabmux-de472d4b7f674cd24c4dafa30ca42bd73665e4f8.tar.bz2 dabmux-de472d4b7f674cd24c4dafa30ca42bd73665e4f8.zip |
Let FIGs fail more gently in case of errors
Diffstat (limited to 'src/fig/FIG0_2.cpp')
-rw-r--r-- | src/fig/FIG0_2.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/fig/FIG0_2.cpp b/src/fig/FIG0_2.cpp index 0e5c13c..e587c2b 100644 --- a/src/fig/FIG0_2.cpp +++ b/src/fig/FIG0_2.cpp @@ -111,7 +111,8 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size) // Exclude Fidc type services, TODO unsupported auto type = s->getType(ensemble); if (type == subchannel_type_t::Fidc) { - throw invalid_argument("FIG0/2 does not support FIDC"); + etiLog.log(warn, "FIG0/2 does not support FIDC"); + continue; } } @@ -250,9 +251,9 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size) if (subchannel == ensemble->subchannels.end()) { etiLog.log(error, "Subchannel %i does not exist for component " - "of service %i\n", + "of service %i", (*component)->subchId, (*component)->serviceId); - throw MuxInitException(); + continue; } switch ((*subchannel)->type) { @@ -286,9 +287,7 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size) } break; default: - etiLog.log(error, - "Component type not supported\n"); - throw MuxInitException(); + throw logic_error("Component type not supported"); } buf += 2; fig0_2->Length += 2; @@ -296,7 +295,7 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size) if (remaining < 0) { etiLog.log(error, "Sorry, no space left in FIG 0/2 to insert " - "component %i of program service %i.\n", + "component %i of program service %i.", curCpnt, cur); throw MuxInitException(); } |