Page MenuHomeHEPForge

No OneTemporary

diff --git a/include/RHEJ/exceptions.hh b/include/RHEJ/exceptions.hh
index c099823..fbe70c4 100644
--- a/include/RHEJ/exceptions.hh
+++ b/include/RHEJ/exceptions.hh
@@ -1,26 +1,44 @@
+/** \file exceptions.hh
+ * \brief Custom exception classes
+ */
#pragma once
#include <stdexcept>
namespace RHEJ{
- struct invalid_type: std::invalid_argument {
- explicit invalid_type(std::string const & what):
- std::invalid_argument{what} {};
- explicit invalid_type(char const * what):
- std::invalid_argument{what} {};
- };
+ //! Exception indicating wrong option type
+ /**
+ * This exception is thrown if a configuration option has
+ * the wrong type (e.g. 'trials' is not set to a number)
+ */
+ struct invalid_type: std::invalid_argument {
+ explicit invalid_type(std::string const & what):
+ std::invalid_argument{what} {};
+ explicit invalid_type(char const * what):
+ std::invalid_argument{what} {};
+ };
- struct unknown_option: std::invalid_argument {
- explicit unknown_option(std::string const & what):
- std::invalid_argument{what} {};
- explicit unknown_option(char const * what):
- std::invalid_argument{what} {};
- };
+ //! Exception indicating unknown option
+ /**
+ * This exception is thrown if an unknown configuration option
+ * is set (e.g. the 'trials' setting is misspelt as 'trails')
+ */
+ struct unknown_option: std::invalid_argument {
+ explicit unknown_option(std::string const & what):
+ std::invalid_argument{what} {};
+ explicit unknown_option(char const * what):
+ std::invalid_argument{what} {};
+ };
- struct missing_option: std::logic_error {
- explicit missing_option(std::string const & what):
- std::logic_error{what} {};
- explicit missing_option(char const * what):
- std::logic_error{what} {};
- };
+ //! Exception indicating missing option setting
+ /**
+ * This exception is thrown if a mandatory configuration option
+ * (e.g. 'trials') is not set.
+ */
+ struct missing_option: std::logic_error {
+ explicit missing_option(std::string const & what):
+ std::logic_error{what} {};
+ explicit missing_option(char const * what):
+ std::logic_error{what} {};
+ };
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jan 21, 2:17 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4224659
Default Alt Text
(2 KB)

Event Timeline