From: Davin McCall Date: Sat, 11 Jun 2016 14:59:46 +0000 (+0100) Subject: Fix (remove) noexcept specification for init_log(). X-Git-Tag: v0.02~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b96c8b9f894aaeb549e85332f4dab64ee72189ef;p=oweals%2Fdinit.git Fix (remove) noexcept specification for init_log(). --- 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;