Libmagicxx v10.0.3
A modern C++23 wrapper for libmagic — the library that powers the Unix file command.
Loading...
Searching...
No Matches
Recognition::MagicIdentifyFileError Class Referencefinal

Exception thrown when file type identification fails. More...

#include <magic_exception.hpp>

Inheritance diagram for Recognition::MagicIdentifyFileError:
Collaboration diagram for Recognition::MagicIdentifyFileError:

Public Member Functions

 MagicIdentifyFileError (const std::string &error_message, const std::string &file_path)
 Construct MagicIdentifyFileError with details.
Public Member Functions inherited from Recognition::MagicException
 MagicException (const std::string &function, const std::string &error_message)
 Construct MagicException with function name and error message.

Detailed Description

Exception thrown when file type identification fails.

This exception is thrown when the underlying magic library cannot determine the type of a file. The error message includes details from the magic library.

See also
Magic::IdentifyFile()
Magic::IdentifyFiles()
Since
10.0.0

Constructor & Destructor Documentation

◆ MagicIdentifyFileError()

Recognition::MagicIdentifyFileError::MagicIdentifyFileError ( const std::string & error_message,
const std::string & file_path )
inline

Construct MagicIdentifyFileError with details.

Parameters
[in]error_messageDescription of why identification failed.
[in]file_pathPath to the file that could not be identified.
Since
10.0.0

The documentation for this class was generated from the following file: