diff options
| author | Stefan Boberg <[email protected]> | 2021-09-15 15:23:47 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-15 15:23:47 +0200 |
| commit | f34aa060d7da16d4e08644cf8572db979f3ea8d0 (patch) | |
| tree | c7c5e5f961c971e2c8e93f542241c7817aa9e3fb /zenserver | |
| parent | Made logging macros always append `sv` string_view literal suffix (diff) | |
| download | zen-f34aa060d7da16d4e08644cf8572db979f3ea8d0.tar.xz zen-f34aa060d7da16d4e08644cf8572db979f3ea8d0.zip | |
Changed `std::exception` into `std::runtime_error` since `std::exception` does not have a constructor which accepts a string argument in the standard (this appears to be an MSVC implementation thing)
Diffstat (limited to 'zenserver')
| -rw-r--r-- | zenserver/compute/apply.cpp | 8 | ||||
| -rw-r--r-- | zenserver/config.cpp | 2 | ||||
| -rw-r--r-- | zenserver/projectstore.cpp | 4 | ||||
| -rw-r--r-- | zenserver/testing/launch.cpp | 2 | ||||
| -rw-r--r-- | zenserver/zenserver.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp index 6eeb6cf70..c3d83b2b5 100644 --- a/zenserver/compute/apply.cpp +++ b/zenserver/compute/apply.cpp @@ -114,7 +114,7 @@ BasicFunctionJob::Wait(uint32_t TimeoutMs) return true; } - throw std::exception("Failed wait on process handle"); + throw std::runtime_error("Failed wait on process handle"); } int @@ -667,7 +667,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::exception("Chunk missing" /* ADD CONTEXT */); + throw std::runtime_error("Chunk missing" /* ADD CONTEXT */); } zen::WriteFile(FilePath, DataBuffer); @@ -693,7 +693,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::exception("Chunk missing" /* ADD CONTEXT */); + throw std::runtime_error("Chunk missing" /* ADD CONTEXT */); } zen::WriteFile(FilePath, DataBuffer); @@ -712,7 +712,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::exception("Chunk missing" /* ADD CONTEXT */); + throw std::runtime_error("Chunk missing" /* ADD CONTEXT */); } zen::WriteFile(FilePath, DataBuffer); diff --git a/zenserver/config.cpp b/zenserver/config.cpp index ae624b169..578a3a202 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -242,7 +242,7 @@ ParseServiceConfig(const std::filesystem::path& DataRoot, ZenServiceConfig& Serv { ZEN_ERROR("config script failure: {}", e.what()); - throw std::exception("fatal zen global config script ({}) failure: {}"_format(ConfigScript, e.what()).c_str()); + throw std::runtime_error("fatal zen global config script ({}) failure: {}"_format(ConfigScript, e.what()).c_str()); } ServiceConfig.MeshEnabled = lua["mesh"]["enable"].get_or(ServiceConfig.MeshEnabled); diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp index 79cd250dc..404484edf 100644 --- a/zenserver/projectstore.cpp +++ b/zenserver/projectstore.cpp @@ -142,14 +142,14 @@ struct ProjectStore::OplogStorage : public RefCounted } else { - throw std::exception("column family iteration failed for '{}': '{}'"_format(RocksdbPath, Status.getState()).c_str()); + throw std::runtime_error("column family iteration failed for '{}': '{}'"_format(RocksdbPath, Status.getState()).c_str()); } Status = rocksdb::DB::Open(Options, RocksdbPath, ColumnDescriptors, &m_RocksDbColumnHandles, &Db); if (!Status.ok()) { - throw std::exception("database open failed for '{}': '{}'"_format(RocksdbPath, Status.getState()).c_str()); + throw std::runtime_error("database open failed for '{}': '{}'"_format(RocksdbPath, Status.getState()).c_str()); } m_RocksDb.reset(Db); diff --git a/zenserver/testing/launch.cpp b/zenserver/testing/launch.cpp index 608b515e1..55695ac9c 100644 --- a/zenserver/testing/launch.cpp +++ b/zenserver/testing/launch.cpp @@ -105,7 +105,7 @@ BasicJob::Wait(uint32_t TimeoutMs) return true; } - throw std::exception("Failed wait on process handle"); + throw std::runtime_error("Failed wait on process handle"); } int diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index 931fe062e..3b56d8683 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -112,7 +112,7 @@ public: if (zen::NamedMutex::Exists(MutexName) || (m_ServerMutex.Create(MutexName) == false)) { - throw std::exception("Failed to create mutex '{}' - is another instance already running?"_format(MutexName).c_str()); + throw std::runtime_error("Failed to create mutex '{}' - is another instance already running?"_format(MutexName).c_str()); } // Ok so now we're configured, let's kick things off |