mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
Implement filesystem_error::what() and improve reporting.
This patch implements the `what()` for filesystem errors. The message includes the 'what_arg', any paths that were specified, and the error code message. Additionally this patch refactors how errors are created, making it easier to report them correctly. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -80,7 +80,8 @@ TEST_CASE(last_write_time_not_representable_error) {
|
||||
TEST_CHECK(last_write_time(file, ec) == file_time_type::min());
|
||||
TEST_CHECK(ErrorIs(ec, expected_err));
|
||||
|
||||
ExceptionChecker CheckExcept(file, expected_err);
|
||||
ExceptionChecker CheckExcept(file, expected_err,
|
||||
"directory_entry::last_write_time");
|
||||
TEST_CHECK_THROW_RESULT(fs::filesystem_error, CheckExcept,
|
||||
ent.last_write_time());
|
||||
|
||||
|
Reference in New Issue
Block a user