mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 11:13:35 +08:00
Centralized fatal error handling via handleFatalError(msg)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user