Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Make proper use of exceptions instead of using the logger #21

Open
stv0g opened this issue Apr 6, 2018 · 2 comments
Open

Make proper use of exceptions instead of using the logger #21

stv0g opened this issue Apr 6, 2018 · 2 comments

Comments

@stv0g
Copy link
Contributor

stv0g commented Apr 6, 2018

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.

@stv0g
Copy link
Contributor Author

stv0g commented Apr 6, 2018

Maybe we can also try to have a constructor with variable arguments just like the spdlog formatter:

villas::Exception(const std::string &fmt, ...)?

@stv0g
Copy link
Contributor Author

stv0g commented Nov 29, 2022

In GitLab by @n-eiling on Nov 29, 2022, 14:57

unassigned @daniel-k

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant