diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-18 12:39:38 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-19 14:15:51 +0000 |
commit | be96d9ccf645c775d9bdaa08ec5ba85b7312578e (patch) | |
tree | 435b6d8edf4bf92480215512ff3c710082462af4 /config | |
parent | 2cb7c0cd99d628fac2f8d1076e2a5b2496f307eb (diff) |
Do not carry exceptions in header files
Diffstat (limited to 'config')
-rw-r--r-- | config/src/vespa/config/common/misc.cpp | 2 | ||||
-rw-r--r-- | config/src/vespa/config/common/misc.h | 3 | ||||
-rw-r--r-- | config/src/vespa/config/print/fileconfigreader.hpp | 1 | ||||
-rw-r--r-- | config/src/vespa/config/set/configsetsource.cpp | 7 |
4 files changed, 6 insertions, 7 deletions
diff --git a/config/src/vespa/config/common/misc.cpp b/config/src/vespa/config/common/misc.cpp index ca4fa8847b0..51a6051e20b 100644 --- a/config/src/vespa/config/common/misc.cpp +++ b/config/src/vespa/config/common/misc.cpp @@ -5,6 +5,7 @@ #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/data/slime/slime.h> +#include "exceptions.h" namespace config { @@ -47,7 +48,6 @@ isGenerationNewer(int64_t newGen, int64_t oldGen) void throwInvalid(const char *format, ...) - throw(InvalidConfigException) { char buf[4000]; va_list args; diff --git a/config/src/vespa/config/common/misc.h b/config/src/vespa/config/common/misc.h index 5a4a68c34aa..bea768ef3c0 100644 --- a/config/src/vespa/config/common/misc.h +++ b/config/src/vespa/config/common/misc.h @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include "exceptions.h" #include "configkey.h" #include <vespa/vespalib/stllike/string.h> #include <vector> @@ -24,7 +23,7 @@ vespalib::string calculateContentMd5(const std::vector<vespalib::string> & fileC bool isGenerationNewer(int64_t newGen, int64_t oldGen); // Helper for throwing invalid config exception -void throwInvalid(const char *fmt, ...) throw (InvalidConfigException) +void throwInvalid(const char *fmt, ...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn)); typedef std::shared_ptr<const vespalib::Slime> SlimePtr; diff --git a/config/src/vespa/config/print/fileconfigreader.hpp b/config/src/vespa/config/print/fileconfigreader.hpp index d5603794539..f5ab49da240 100644 --- a/config/src/vespa/config/print/fileconfigreader.hpp +++ b/config/src/vespa/config/print/fileconfigreader.hpp @@ -1,5 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#include <vespa/config/common/exceptions.h> #include <fstream> #include <sstream> diff --git a/config/src/vespa/config/set/configsetsource.cpp b/config/src/vespa/config/set/configsetsource.cpp index 0ccfd2f929d..c62452a6415 100644 --- a/config/src/vespa/config/set/configsetsource.cpp +++ b/config/src/vespa/config/set/configsetsource.cpp @@ -1,13 +1,12 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP(".config.set.configsetsource"); #include "configsetsource.h" #include <vespa/config/print/asciiconfigwriter.h> #include <vespa/config/common/misc.h> +#include <vespa/config/common/exceptions.h> #include <vespa/vespalib/stllike/asciistream.h> +#include <vespa/log/log.h> +LOG_SETUP(".config.set.configsetsource"); namespace config { |