MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / addFileNameInError

Function addFileNameInError

source/MRMesh/MRStringConvert.h:103–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101/// if (v) contains an error, then appends given file name to that error
102template<typename T>
103[[nodiscard]] inline Expected<T> addFileNameInError( Expected<T> v, const std::filesystem::path & file )
104{
105 if ( !v.has_value() )
106 v = unexpected( v.error() + ": " + utf8string( file ) );
107 return v;
108}
109
110/// in case of empty vector, returns "Empty"
111/// in case of single input file.ext, returns ".EXT"

Callers 15

gridsFromVdbFunction · 0.85
gridFromRawFunction · 0.85
fromRawFunction · 0.85
fromGavFunction · 0.85
toRawAutonameFunction · 0.85
gridToRawAutonameFunction · 0.85
toGavFunction · 0.85
gridToVdbFunction · 0.85
fromMrmeshFunction · 0.85
fromOffFunction · 0.85
fromObjFunction · 0.85
fromAnyStlFunction · 0.85

Calls 3

utf8stringFunction · 0.85
errorMethod · 0.80
unexpectedFunction · 0.70

Tested by

no test coverage detected