You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/nif/exception.hpp

25 lines
560 B
C++

#ifndef OPENMW_COMPONENTS_NIF_EXCEPTION_HPP
#define OPENMW_COMPONENTS_NIF_EXCEPTION_HPP
#include <stdexcept>
#include <string>
namespace Nif
{
struct Exception : std::runtime_error
{
explicit Exception(std::string_view message, std::string_view path)
: std::runtime_error([&] {
std::string result = "NIFFile Error: ";
result += message;
result += " when reading ";
result += path;
return result;
}())
{
}
};
}
#endif