|
Libmagicxx v10.0.3
A modern C++23 wrapper for libmagic — the library that powers the Unix file command.
|
Base exception class for all Magic-related errors. More...
#include <magic_exception.hpp>


Public Member Functions | |
| MagicException (const std::string &function, const std::string &error_message) | |
| Construct MagicException with function name and error message. | |
Base exception class for all Magic-related errors.
MagicException inherits from std::runtime_error and provides a common base class for all exceptions thrown by the Magic class. This allows users to catch all Magic errors with a single catch block.
|
inline |
Construct MagicException with function name and error message.
Creates an exception message in the format:
| [in] | function | The name of the function where the error occurred. |
| [in] | error_message | Description of the error (optional). |