<commit_before>#ifndef GUARD_exception_macros_hpp
#define GUARD_exception_macros_hpp


/** @file exception_macros.hpp
 *
 * @brief Provides macros to ease the declaration and definition of
 * exception classes.
 *
 * The boilerplate involved in creating exception
 * classes can discourage their creation. While macros are generally to
 * be avoided, having a reasonably fine-grained structure of exceptions
 * is a good thing - which unfortunately is discouraged by the amount
 * of boilerplate involved in creating such a structure. These macros
 * aim to vastly reduce the repetitive boilerplate required to create
 * a hierarchy of exception classes.
 *
 */


/**
 * Macro to declare and define an exception class named \c CLASS, inheriting
 * from std::exception. Instances of the newly created exception class, unlike
 * std::exception, should be initialized with a std::string, representing
 * an error message.
 *
 * The macro should be invoked only in a location where declarations for
 * std::string and std::exception are available (typically in a location that
 * has included <string> and <stdexcept>).
 *
 * Note the macro definition omits a trailing semi-colon. A semi-colon should
 * always be appended when the macro is invoked.
 */
#define JEWEL_STANDARD_EXCEPTION(CLASS)\
	class CLASS: public std::exception\<commit_msg>Added todo to exception_macros.hpp.<commit_after>#ifndef GUARD_exception_macros_hpp
#define GUARD_exception_macros_hpp

/** @file exception_macros.hpp
 *
 * @brief Provides macros to ease the declaration and definition of
 * exception classes.
 *
 * The boilerplate involved in creating exception
 * classes can discourage their creation. While macros are generally to
 * be avoided, having a reasonably fine-grained structure of exceptions
 * is a good thing - which unfortunately is discouraged by the amount
 * of boilerplate involved in creating such a structure. These macros
 * aim to vastly reduce the repetitive boilerplate required to create
 * a hierarchy of exception classes.
 *
 * @todo HIGH PRIORITY
 * Make CLASS also be default constructible, so that it will work with the
 * Boost exception framework. Also make CLASS inherit from boost::exception
 * as well as from std::exception. Specify in the documentation that the
 * inheritance is virtual. Also, consider including headers <stdexcept>,
 * <string> and <boost/exceptions/all.hpp> in this file. (This would make for
 * greater convenience but also less transparency.)
 *
 */


/**
 * Macro to declare and define an exception class named \c CLASS, inheriting
 * from std::exception. Instances of the newly created exception class, unlike
 * std::exception, should be initialized with a std::string, representing
 * an error message.
 *
 * The macro should be invoked only in a location where declarations for
 * std::string and std::exception are available (typically in a location that
 * has included <string> and <stdexcept>).
 *
 * Note the macro definition omits a trailing semi-colon. A semi-colon should
 * always be appended when the macro is invoked.
 */
#define JEWEL_STANDARD_EXCEPTION(CLASS)\
	class CLASS: public std::exception\
{'fraction_non_alphanumeric': 0.06408629441624365, 'fraction_numerical': 0.0, 'mean_word_length': 4.50261780104712, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7017147', 'n_tokens_mistral': 816, 'n_tokens_neox': 757, 'n_words': 390}