From b96c8b9f894aaeb549e85332f4dab64ee72189ef Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 11 Jun 2016 15:59:46 +0100 Subject: [PATCH] Fix (remove) noexcept specification for init_log(). --- src/dinit-log.cc | 7 +++++-- src/dinit-log.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dinit-log.cc b/src/dinit-log.cc index 85bd772..64767d4 100644 --- a/src/dinit-log.cc +++ b/src/dinit-log.cc @@ -188,14 +188,17 @@ Rearm BufferedLogStream::gotEvent(EventLoop_t *loop, int fd, int flags) noexcept return Rearm::REARM; } -void init_log(ServiceSet *sset) noexcept +// Initialise the logging subsystem +// Potentially throws std::bad_alloc or std::system_error +void init_log(ServiceSet *sset) { service_set = sset; log_stream[DLOG_CONS].registerWith(&eventLoop, STDOUT_FILENO, out_events); // TODO register in disabled state enable_console_log(true); } -// Set up the main log to output to the given file descriptor +// Set up the main log to output to the given file descriptor. +// Potentially throws std::bad_alloc or std::system_error void setup_main_log(int fd) { log_stream[DLOG_MAIN].init(STDERR_FILENO); diff --git a/src/dinit-log.h b/src/dinit-log.h index 0f6ee07..5f1d51b 100644 --- a/src/dinit-log.h +++ b/src/dinit-log.h @@ -19,7 +19,7 @@ enum class LogLevel { extern LogLevel log_level[2]; void enable_console_log(bool do_enable) noexcept; -void init_log(ServiceSet *sset) noexcept; +void init_log(ServiceSet *sset); void setup_main_log(int fd); bool is_log_flushed() noexcept; -- 2.25.1