diff --git a/CMakeLists.txt b/CMakeLists.txt index 26080cf0..dbd2b5d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT BUILD_TESTING) set(BUILD_TESTING OFF CACHE BOOL "BUILD_TESTING") endif(NOT BUILD_TESTING) -# Default vaule is to build in release mode +# Default value is to build in release mode if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE INTERNAL "CMAKE_BUILD_TYPE") endif(NOT CMAKE_BUILD_TYPE) diff --git a/src/blockstore/implementations/integrity/IntegrityViolationError.h b/src/blockstore/implementations/integrity/IntegrityViolationError.h index 9e1192a5..d377f85b 100644 --- a/src/blockstore/implementations/integrity/IntegrityViolationError.h +++ b/src/blockstore/implementations/integrity/IntegrityViolationError.h @@ -4,27 +4,20 @@ #include #include +#include namespace blockstore { namespace integrity { - class IntegrityViolationError final : public std::exception { - public: - - const char *what() const throw() override { - return _reason.c_str(); - } - + class IntegrityViolationError final : public std::runtime_error { private: // Constructor is private to make sure that only IntegrityBlockStore can throw this exception. // This is because IntegrityBlockStore wants to know about integrity violations and // block all further file system access if it happens. IntegrityViolationError(const std::string &reason) - : _reason("Integrity violation: " + reason) { + : std::runtime_error("Integrity violation: " + reason) { } friend class IntegrityBlockStore2; - - std::string _reason; }; diff --git a/src/fspp/fuse/Fuse.cpp b/src/fspp/fuse/Fuse.cpp index 0df6933c..67dbf582 100644 --- a/src/fspp/fuse/Fuse.cpp +++ b/src/fspp/fuse/Fuse.cpp @@ -222,7 +222,7 @@ Fuse::Fuse(Filesystem *fs, std::string fstype, boost::optional fsna } void Fuse::_logException(const std::exception &e) { - LOG(ERROR, "Exception thrown: ", e.what()); + LOG(ERROR, "Exception thrown: {}", e.what()); } void Fuse::_logUnknownException() {