SUNphi  1.0
MinimalCrash.hpp File Reference

Minimal version of the crasher. More...

#include <cstring>
#include <errno.h>

Go to the source code of this file.

Macros

#define MINIMAL_CRASH(...)   minimalCrash(__FILE__,__LINE__,__PRETTY_FUNCTION__,__VA_ARGS__)
 Initialize the minimal crasher.
 
#define MINIMAL_CRASH_STDLIBERR(STRING)   MINIMAL_CRASH(__FILE__,__LINE__,__PRETTY_FUNCTION__,STRING " stdliberr: %s",strerror(errno))
 Minimal crash with stdlib error.
 

Functions

void SUNphi::minimalCrash (const char *path, const int line, const char *funcName, const char *format,...)
 

Detailed Description

Minimal version of the crasher.

This file can be included in place of Crasher.hpp, in case the former cannot be included due to missing requirements, e.g. in presence of routine from which the actual crasher depends, such as threads or MPI. The actual crasher is called in the cpp file

Definition in file MinimalCrash.hpp.

Function Documentation

void SUNphi::minimalCrash ( const char *  path,
const int  line,
const char *  funcName,
const char *  format,
  ... 
)

Wraps the actual crasher through the old-style C variadic function

We cannot use variadic template version here, as the crash cannot be called directly here, since "Logger.hpp" is expected

Starts the variadic arguments

Starts the variadic arguments

Parameters
pathFile where the crash happened
lineLine number where the crash happened
funcNameFunction where the crash happened
formatFormatting string

Definition at line 53 of file SUNphi.cpp.