\brief Thrown in the event that an Any cannot be cast to the desired type It is used internally during function dispatch. \sa chaiscript::detail::Any
| 19 | /// |
| 20 | /// \sa chaiscript::detail::Any |
| 21 | class bad_any_cast : public std::bad_cast |
| 22 | { |
| 23 | public: |
| 24 | bad_any_cast() = default; |
| 25 | |
| 26 | bad_any_cast(const bad_any_cast &) = default; |
| 27 | |
| 28 | ~bad_any_cast() noexcept override = default; |
| 29 | |
| 30 | /// \brief Description of what error occurred |
| 31 | const char * what() const noexcept override |
| 32 | { |
| 33 | return m_what.c_str(); |
| 34 | } |
| 35 | |
| 36 | private: |
| 37 | std::string m_what = "bad any cast"; |
| 38 | }; |
| 39 | } |
| 40 | |
| 41 |
no outgoing calls
no test coverage detected