Cytnx 1.1.2.dev761+ge28145acd
Loading...
Searching...
No Matches
cytnx_error.hpp File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <stdarg.h>
#include <iostream>
#include <stdexcept>
#include <string>
Include dependency graph for cytnx_error.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cytnx::error

Namespaces

namespace  cytnx
namespace  cytnx::internal

Macros

#define CYTNX_HAS_EXECINFO   0
#define CYTNX_FUNC_NAME   __PRETTY_FUNCTION__
#define cytnx_error_msg(is_true, format, ...)
#define cytnx_warning_msg(is_true, format, ...)

Functions

std::string cytnx::internal::vformat_message (char const *format, va_list args)
std::string cytnx::internal::compose_report (char const *kind, char const *func, char const *file, int line, const std::string &msg)
void cytnx::internal::print_backtrace_if_debug ()
void cytnx::internal::error_msg_impl (char const *func, char const *file, int line, char const *format,...)
void cytnx::internal::warning_msg_impl (char const *func, char const *file, int line, char const *format,...)

Variables

bool cytnx::User_debug

Macro Definition Documentation

◆ cytnx_error_msg

#define cytnx_error_msg ( is_true,
format,
... )
Value:
do { \
if (is_true) \
::cytnx::internal::error_msg_impl(CYTNX_FUNC_NAME, __FILE__, __LINE__, \
(format)__VA_OPT__(, ) __VA_ARGS__); \
} while (0)
#define CYTNX_FUNC_NAME
Definition cytnx_error.hpp:28

◆ CYTNX_FUNC_NAME

#define CYTNX_FUNC_NAME   __PRETTY_FUNCTION__

◆ CYTNX_HAS_EXECINFO

#define CYTNX_HAS_EXECINFO   0

◆ cytnx_warning_msg

#define cytnx_warning_msg ( is_true,
format,
... )
Value:
do { \
if (is_true) \
::cytnx::internal::warning_msg_impl(CYTNX_FUNC_NAME, __FILE__, __LINE__, \
(format)__VA_OPT__(, ) __VA_ARGS__); \
} while (0)