diff --git a/src/Exception.hpp b/src/Exception.hpp index 1ba0af3..5b52775 100644 --- a/src/Exception.hpp +++ b/src/Exception.hpp @@ -1,5 +1,6 @@ #ifndef ARBUTILS_EXCEPTION_HPP #define ARBUTILS_EXCEPTION_HPP +#include #include #include #include "ErrorHelpers.hpp" @@ -135,7 +136,9 @@ namespace ArbUt { backward::SnippetFactory& snippetFactory) { auto fileName = (strrchr(source.filename.c_str(), '/') ? strrchr(source.filename.c_str(), '/') + 1 : source.filename.c_str()); - + if (strlen(fileName) == 0){ + return; + } auto snippetSearch = snippetFactory.get_snippet(source.filename, source.line, 1); if (snippetSearch.empty()) { ss << fileName << "[" << source.line << "]" << std::endl;