Make proper use of exceptions instead of using the logger
stv0g opened this issue · comments
I suggest that we introduce a couple of exceptions like:
villas::Exception(const std::string &msg)
villas::SystemError(int errno, const std::string &msg)
Instead of logging the error before throwing the exception or within the exception itself, we should only log the error in the catch block.
Maybe we can also try to have a constructor with variable arguments just like the spdlog formatter:
villas::Exception(const std::string &fmt, ...)
?