https://gitlab.opengeosys.org/ogs/ogs.git
Revision c97479daea22a5cfc05ac2e55f1bff2ec54de8bf authored by Dmitri Naumov on 18 May 2021, 18:14:32 UTC, committed by Dmitry Yu. Naumov on 03 June 2021, 16:34:25 UTC
1 parent 81d347e
Raw File
Tip revision: c97479daea22a5cfc05ac2e55f1bff2ec54de8bf authored by Dmitri Naumov on 18 May 2021, 18:14:32 UTC
[GL] Add parent node access.
Tip revision: c97479d
Error.h
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#pragma once

#include <cstdlib>
#include "Logging.h"

#ifdef OGS_FATAL_ABORT
#define OGS_FATAL(...)                                                      \
    {                                                                       \
        BaseLib::console->critical("{}:{} {}() ", __FILE__, __LINE__,       \
                                   __FUNCTION__, fmt::format(__VA_ARGS__)); \
        std::abort();                                                       \
    }
#else  // OGS_FATAL_ABORT
#include <stdexcept>
#define OGS_FATAL(...)                                                      \
    {                                                                       \
        BaseLib::console->critical("{}:{} {}() ", __FILE__, __LINE__,       \
                                   __FUNCTION__, fmt::format(__VA_ARGS__)); \
        throw std::runtime_error(fmt::format(__VA_ARGS__));                 \
    }
#endif  // OGS_FATAL_ABORT

back to top