summaryrefslogtreecommitdiffstats
path: root/src/ClockTAI.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-23 08:57:43 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-23 08:57:43 +0100
commitacfabd815f1be870ea01120248384c663832e2b2 (patch)
tree9fe568ce8807f16f94a41af986590013da2a971e /src/ClockTAI.h
parente3bdb3bb6e089dadff0727e86fb7441bcc58c788 (diff)
downloaddabmux-acfabd815f1be870ea01120248384c663832e2b2.tar.gz
dabmux-acfabd815f1be870ea01120248384c663832e2b2.tar.bz2
dabmux-acfabd815f1be870ea01120248384c663832e2b2.zip
Handle download failure in TAI bulletin download and replace boost regex with std
Diffstat (limited to 'src/ClockTAI.h')
-rw-r--r--src/ClockTAI.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ClockTAI.h b/src/ClockTAI.h
index 99827ba..4ee4072 100644
--- a/src/ClockTAI.h
+++ b/src/ClockTAI.h
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2017
+ Copyright (C) 2018
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -59,9 +59,12 @@ class ClockTAI {
#endif
private:
+ class download_failed {};
+
// Either retrieve the bulletin from the cache or if necessarly
// download it, and calculate the TAI-UTC offset.
- // Returns the offset.
+ // Returns the offset or throws download_failed or a range_error
+ // if the offset is out of bounds.
int get_valid_offset(void);
// Download of new bulletin is done asynchronously