error.h File Reference
#include <TiledArray/config.h>
#include <stdexcept>
#include <string>
#include <iostream>
Include dependency graph for error.h:
This graph shows which files directly or indirectly include this file:

Classes

class  TiledArray::Exception
 

Namespaces

 TiledArray
 

Macros

#define TA_STRINGIZE_IMPL(s)   #s
 
#define TA_STRINGIZE(s)   TA_STRINGIZE_IMPL(s)
 
#define TA_ASSERT_MESSAGE(EXPR, ...)
 
#define TA_ASSERT(EXPR, ...)
 
#define TA_EXCEPTION_MESSAGE(file, line, mess)    "TiledArray: exception at " file "(" TA_STRINGIZE(line) "): " mess
 
#define TA_EXCEPTION(m)
 
#define TA_USER_ERROR_MESSAGE(m)    std::cerr << "!! ERROR TiledArray: " << m << "\n";
 

Functions

void TiledArray::exception_break ()
 
void TiledArray::assert_failed (const std::string &m)
 
TiledArray initialization.

These functions initialize TiledArray and (if needed) MADWorld runtime.

Note
the default World object is set to the object returned by these.
Warning
MADWorld can only be initialized/finalized once, hence if TiledArray initializes MADWorld it can also be initialized/finalized only once.
void TiledArray::ta_abort ()
 
void TiledArray::ta_abort (const std::string &m)
 

Macro Definition Documentation

◆ TA_ASSERT

#define TA_ASSERT (   EXPR,
  ... 
)
Value:
do { \
if (!(EXPR)) \
} while(0)

Definition at line 39 of file error.h.

◆ TA_ASSERT_MESSAGE

#define TA_ASSERT_MESSAGE (   EXPR,
  ... 
)
Value:
__FILE__ ":" TA_STRINGIZE(__LINE__) ": " \
"TA_ASSERT failed: " TA_STRINGIZE(EXPR)

Definition at line 32 of file error.h.

◆ TA_EXCEPTION

#define TA_EXCEPTION (   m)
Value:
do { \
throw TiledArray::Exception(TA_EXCEPTION_MESSAGE(__FILE__, __LINE__, m)); \
} while (0)

throws TiledArray::Exception with message m annotated with the file name and line number

Parameters
ma C-style string constant

Definition at line 83 of file error.h.

◆ TA_EXCEPTION_MESSAGE

#define TA_EXCEPTION_MESSAGE (   file,
  line,
  mess 
)     "TiledArray: exception at " file "(" TA_STRINGIZE(line) "): " mess

Definition at line 77 of file error.h.

◆ TA_STRINGIZE

#define TA_STRINGIZE (   s)    TA_STRINGIZE_IMPL(s)

Definition at line 30 of file error.h.

◆ TA_STRINGIZE_IMPL

#define TA_STRINGIZE_IMPL (   s)    #s

Definition at line 29 of file error.h.

◆ TA_USER_ERROR_MESSAGE

#define TA_USER_ERROR_MESSAGE (   m)     std::cerr << "!! ERROR TiledArray: " << m << "\n";

Definition at line 93 of file error.h.

void assert_failed(const std::string &m)
Definition: error.h:64
#define TA_STRINGIZE(s)
Definition: error.h:30
#define TA_ASSERT_MESSAGE(EXPR,...)
Definition: error.h:32
#define TA_EXCEPTION_MESSAGE(file, line, mess)
Definition: error.h:77
void exception_break()
Definition: error.h:62