MCPcopy Create free account
hub / github.com/boostorg/filesystem / what

Method what

src/exception.cpp:122–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122BOOST_FILESYSTEM_DECL const char* filesystem_error::what() const noexcept
123{
124 if (m_imp_ptr.get()) try
125 {
126 if (m_imp_ptr->m_what.empty())
127 {
128 m_imp_ptr->m_what = system::system_error::what();
129 if (!m_imp_ptr->m_path1.empty())
130 {
131 m_imp_ptr->m_what += ": \"";
132 m_imp_ptr->m_what += m_imp_ptr->m_path1.string();
133 m_imp_ptr->m_what += "\"";
134 }
135 if (!m_imp_ptr->m_path2.empty())
136 {
137 m_imp_ptr->m_what += ", \"";
138 m_imp_ptr->m_what += m_imp_ptr->m_path2.string();
139 m_imp_ptr->m_what += "\"";
140 }
141 }
142
143 return m_imp_ptr->m_what.c_str();
144 }
145 catch (...)
146 {
147 m_imp_ptr->m_what.clear();
148 }
149
150 return system::system_error::what();
151}
152
153BOOST_FILESYSTEM_DECL path const& filesystem_error::get_empty_path() noexcept
154{

Callers 15

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
try_existsFunction · 0.80
mainFunction · 0.80
report_system_errorFunction · 0.80
report_filesystem_errorFunction · 0.80
mainFunction · 0.80
throws_fs_errorFunction · 0.80
exception_testsFunction · 0.80
create_hard_link_testsFunction · 0.80
create_symlink_testsFunction · 0.80

Calls 5

getMethod · 0.80
stringMethod · 0.80
clearMethod · 0.80
emptyMethod · 0.45
c_strMethod · 0.45

Tested by 9

throws_fs_errorFunction · 0.64
exception_testsFunction · 0.64
create_hard_link_testsFunction · 0.64
create_symlink_testsFunction · 0.64
create_directory_testsFunction · 0.64
copy_file_testsFunction · 0.64
creation_time_testsFunction · 0.64
error_handling_testFunction · 0.64
mainFunction · 0.64