MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / GetErrorMessage

Function GetErrorMessage

Exporter/InvalidOutputFileException.cpp:25–37  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

23 {
24 //---------------------------------------------------------------------
25 std::string GetErrorMessage(const std::filesystem::path& output,
26 const std::string& outputKind)
27 {
28 auto error = "Cannot write " + outputKind +
29 " export to the file: \"" + output.string() + "\".";
30
31 if (std::filesystem::is_directory(output))
32 {
33 error += " The output \"" + output.string() +
34 "\" is a directory whereas as it must be a file.";
35 }
36 return error;
37 }
38 }
39
40 //-------------------------------------------------------------------------

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected