mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 21:26:41 +00:00 
			
		
		
		
	These functions use NIFFile only as context, they are not really a part of either reading nor state invariant. And they only confuse reader because it's not immediatelly obvious that no code is executed after fail.
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			502 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			502 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_COMPONENTS_NIF_EXCEPTION_HPP
 | |
| #define OPENMW_COMPONENTS_NIF_EXCEPTION_HPP
 | |
| 
 | |
| #include <filesystem>
 | |
| #include <stdexcept>
 | |
| #include <string>
 | |
| 
 | |
| #include <components/files/conversion.hpp>
 | |
| 
 | |
| namespace Nif
 | |
| {
 | |
|     struct Exception : std::runtime_error
 | |
|     {
 | |
|         explicit Exception(const std::string& message, const std::filesystem::path& path)
 | |
|             : std::runtime_error("NIFFile Error: " + message + " when reading " + Files::pathToUnicodeString(path))
 | |
|         {
 | |
|         }
 | |
|     };
 | |
| }
 | |
| 
 | |
| #endif
 |