handleFatalError() moved to error.hpp

This commit is contained in:
Pavel Kirienko
2014-03-28 19:26:25 +04:00
parent ae63ad5db5
commit 0d9be57d92
9 changed files with 15 additions and 27 deletions
+9
View File
@@ -26,4 +26,13 @@ enum
ErrLogic
};
/**
* Fatal error handler.
* Throws std::runtime_error() if exceptions are available, otherwise calls assert(0) then std::abort().
*/
#if __GNUC__
__attribute__ ((noreturn))
#endif
void handleFatalError(const char* msg);
}
-19
View File
@@ -1,19 +0,0 @@
/*
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#pragma once
namespace uavcan
{
/**
* Fatal error handler.
* Throws std::runtime_error() if exceptions are available, otherwise calls assert(0) then std::abort().
*/
#if __GNUC__
__attribute__ ((noreturn))
#endif
void handleFatalError(const char* msg);
}
@@ -11,7 +11,6 @@
#include <stdexcept>
#include <cstring>
#include <uavcan/error.hpp>
#include <uavcan/fatal_error.hpp>
#include <uavcan/util/compile_time.hpp>
#include <uavcan/impl_constants.hpp>
#include <uavcan/marshal/type_util.hpp>
@@ -7,10 +7,10 @@
#include <cassert>
#include <bitset>
#include <algorithm>
#include <uavcan/error.hpp>
#include <uavcan/stdint.hpp>
#include <uavcan/data_type.hpp>
#include <uavcan/util/compile_time.hpp>
#include <uavcan/fatal_error.hpp>
#include <uavcan/linked_list.hpp>
#if UAVCAN_DEBUG
# include <uavcan/debug.hpp>
+2 -2
View File
@@ -5,12 +5,12 @@
#pragma once
#include <uavcan/stdint.hpp>
#include <uavcan/error.hpp>
#include <uavcan/impl_constants.hpp>
#include <uavcan/linked_list.hpp>
#include <uavcan/node/scheduler.hpp>
#include <uavcan/node/abstract_node.hpp>
#include <uavcan/util/compile_time.hpp>
#include <uavcan/linked_list.hpp>
#include <uavcan/fatal_error.hpp>
#if !defined(UAVCAN_CPP11) || !defined(UAVCAN_CPP_VERSION)
# error UAVCAN_CPP_VERSION
@@ -5,7 +5,7 @@
#pragma once
#include <cstdlib>
#include <uavcan/fatal_error.hpp>
#include <uavcan/error.hpp>
#include <uavcan/impl_constants.hpp>
#ifndef UAVCAN_CPP_VERSION
@@ -4,7 +4,7 @@
#pragma once
#include <uavcan/fatal_error.hpp>
#include <uavcan/error.hpp>
#include <uavcan/impl_constants.hpp>
#include <uavcan/util/compile_time.hpp>
@@ -5,7 +5,7 @@
#include <cassert>
#include <cstdlib>
#include <stdexcept>
#include <uavcan/fatal_error.hpp>
#include <uavcan/error.hpp>
#include <uavcan/impl_constants.hpp>
#ifndef UAVCAN_EXCEPTIONS
@@ -6,7 +6,6 @@
#include <cassert>
#include <cstdlib>
#include <uavcan/debug.hpp>
#include <uavcan/fatal_error.hpp>
#include <uavcan/protocol/node_status_monitor.hpp>
namespace uavcan