12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-02-22
- * Changed: 2024-09-11
- *
- * */
- #ifndef LS_STD_EXCEPTION_HPP
- #define LS_STD_EXCEPTION_HPP
- #include <exception>
- #include <ls-std/os/dynamic-goal.hpp>
- #include <string>
- #include <string_view>
- /*
- * @doc: class(name: 'Exception', package: 'core')
- * @doc: core.Exception.description('This a base exception that can be thrown in any scenario.')
- * */
- namespace ls::std::core
- {
- class LS_STD_DYNAMIC_GOAL Exception : public ::std::exception
- {
- public:
- explicit Exception(::std::string _name);
- ~Exception() noexcept override = 0;
- [[nodiscard]] ::std::string getName() const;
- protected:
- [[nodiscard]] const char *_getIdentifiedMessage(const ::std::string &_defaultMessage) const;
- void _setMessage(::std::string_view _message);
- private:
- ::std::string message{};
- ::std::string name{};
- };
- }
- #endif
|