mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 03:11:35 +08:00
handleFatalError() moved to error.hpp
This commit is contained in:
@@ -26,4 +26,13 @@ enum
|
|||||||
ErrLogic
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 <stdexcept>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <uavcan/error.hpp>
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/fatal_error.hpp>
|
|
||||||
#include <uavcan/util/compile_time.hpp>
|
#include <uavcan/util/compile_time.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
#include <uavcan/marshal/type_util.hpp>
|
#include <uavcan/marshal/type_util.hpp>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/stdint.hpp>
|
#include <uavcan/stdint.hpp>
|
||||||
#include <uavcan/data_type.hpp>
|
#include <uavcan/data_type.hpp>
|
||||||
#include <uavcan/util/compile_time.hpp>
|
#include <uavcan/util/compile_time.hpp>
|
||||||
#include <uavcan/fatal_error.hpp>
|
|
||||||
#include <uavcan/linked_list.hpp>
|
#include <uavcan/linked_list.hpp>
|
||||||
#if UAVCAN_DEBUG
|
#if UAVCAN_DEBUG
|
||||||
# include <uavcan/debug.hpp>
|
# include <uavcan/debug.hpp>
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <uavcan/stdint.hpp>
|
#include <uavcan/stdint.hpp>
|
||||||
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
|
#include <uavcan/linked_list.hpp>
|
||||||
#include <uavcan/node/scheduler.hpp>
|
#include <uavcan/node/scheduler.hpp>
|
||||||
#include <uavcan/node/abstract_node.hpp>
|
#include <uavcan/node/abstract_node.hpp>
|
||||||
#include <uavcan/util/compile_time.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)
|
#if !defined(UAVCAN_CPP11) || !defined(UAVCAN_CPP_VERSION)
|
||||||
# error UAVCAN_CPP_VERSION
|
# error UAVCAN_CPP_VERSION
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <uavcan/fatal_error.hpp>
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
|
|
||||||
#ifndef UAVCAN_CPP_VERSION
|
#ifndef UAVCAN_CPP_VERSION
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <uavcan/fatal_error.hpp>
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
#include <uavcan/util/compile_time.hpp>
|
#include <uavcan/util/compile_time.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <uavcan/fatal_error.hpp>
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
|
|
||||||
#ifndef UAVCAN_EXCEPTIONS
|
#ifndef UAVCAN_EXCEPTIONS
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <uavcan/debug.hpp>
|
#include <uavcan/debug.hpp>
|
||||||
#include <uavcan/fatal_error.hpp>
|
|
||||||
#include <uavcan/protocol/node_status_monitor.hpp>
|
#include <uavcan/protocol/node_status_monitor.hpp>
|
||||||
|
|
||||||
namespace uavcan
|
namespace uavcan
|
||||||
|
|||||||
Reference in New Issue
Block a user