Function crashAbort

Synopsis

#include <src/easylogging++.h>

static void crashAbort(int sig, const char *sourceFile="", unsigned int long line=0)

Description

Abort due to crash with signal in parameter.

el

Parameters

sig - Crash signal

Helpers

Mentioned in

Source

Lines 2929-2941 in src/easylogging++.cc. Line 3691 in src/easylogging++.h.

void Helpers::crashAbort(int sig, const char* sourceFile, unsigned int long line) {
  std::stringstream ss;
  ss << base::debug::crashReason(sig).c_str();
  ss << " - [Called el::Helpers::crashAbort(" << sig << ")]";
  if (sourceFile != nullptr && strlen(sourceFile) > 0) {
    ss << " - Source: " << sourceFile;
    if (line > 0)
      ss << ":" << line;
    else
      ss << " (line number not specified)";
  }
  base::utils::abort(sig, ss.str());
}





Add Discussion

Log in to comment