diff --git a/src/test/helper/DumpParserClient.h b/src/test/helper/DumpParserClient.h index 8810dc67..9c1efbbd 100644 --- a/src/test/helper/DumpParserClient.h +++ b/src/test/helper/DumpParserClient.h @@ -4,6 +4,8 @@ #include "data/parser/ParseLocation.h" #include "data/parser/ParserClient.h" +#include + class DumpParserClient : public ParserClient { public: @@ -43,9 +45,16 @@ public: const ParseLocation& location) { std::string contextNameString = contextName.getQualifiedNameWithSignature(); - if (FilePath(contextNameString).exists()) + try { - contextNameString = FilePath(contextNameString).fileName(); + if (FilePath(contextNameString).exists()) + { + contextNameString = FilePath(contextNameString).fileName(); + } + } + catch (const boost::filesystem::filesystem_error& e) + { + // do nothing and use the old contectNameString } m_dump += referenceKindToString(referenceKind) + " " + addLocationSuffix(contextNameString + " -> " + referencedName.getQualifiedNameWithSignature() + " [" + location.filePath.fileName(), location) + "]\n"; }