std::filesystem::filesystem_error::filesystem_error

From Get docs
Cpp/docs/latest/filesystem/filesystem error/filesystem error


std::filesystem::filesystem_error::filesystem_error

filesystem_error( const std::string& what_arg,
                  std::error_code ec );
(1) (since C++17)
filesystem_error( const std::string& what_arg,
                  const std::filesystem::path& p1,
                  std::error_code ec );
(2) (since C++17)
filesystem_error( const std::string& what_arg,
                  const std::filesystem::path& p1,
                  const std::filesystem::path& p2,
                  std::error_code ec );
(3) (since C++17)

Constructs a new filesystem error object. The error code is set to ec and optionally, the paths that were involved in the operation that resulted in the error, are set to p1 and p2. what() after construction returns a string that contains what_arg.

Parameters

Example

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/filesystem/filesystem_error/filesystem_error