std::filesystem::filesystem_error::filesystem_error

filesystem_error( const std::string& what_arg,
                  std::error_code ec );
(1) (C++17 起)
filesystem_error( const std::string& what_arg,

                  const std::filesystem::path& p1,

                  std::error_code ec );
(2) (C++17 起)
filesystem_error( const std::string& what_arg,

                  const std::filesystem::path& p1,
                  const std::filesystem::path& p2,

                  std::error_code ec );
(3) (C++17 起)

构造新的文件系统错误对象。将解释性字符串设为 what_arg ,错误码设为 ec ,并可选地将导致错误的操作所涉及的路径,设为 p1p2

参数

what_arg - 解释性字符串
ec - 错误码
p1 - 错误操作涉及的首个路径
p2 - 错误操作涉及的第二个路径

示例

版本历史

  • (当前 | 先前 2017年4月30日 (日) 08:01Fruderica讨论 | 贡献. . (1,103字节) (+179). . (撤销)
  • 当前 | 先前) 2017年4月30日 (日) 06:49Fruderica讨论 | 贡献. . (924字节) (+924). . (以“{{cpp/filesystem/filesystem_error/title|filesystem_error}} {{cpp/filesystem/filesystem_error/navbar}} {{dcl begin}} {{dcl | num=1 | since=c++17 | 1= filesystem_error...”为内容创建页面)