Potential fix for strange new error in clang 14
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-05-16 19:03:30 +02:00
parent 468f5b5e05
commit 758b3f5631
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#ifndef ARBUTILS_EXCEPTION_HPP
#define ARBUTILS_EXCEPTION_HPP
#include <cstring>
#include <stdexcept>
#include <string>
#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;