Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
libuavcan/src/uc_error.cpp
- Committer:
- RuslanUrya
- Date:
- 2018-04-14
- Revision:
- 0:dfe6edabb8ec
File content as of revision 0:dfe6edabb8ec:
/* * Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com> */ #include <uavcan/error.hpp> #include <cassert> #include <cstdlib> #ifndef UAVCAN_EXCEPTIONS # error UAVCAN_EXCEPTIONS #endif #if UAVCAN_EXCEPTIONS # include <stdexcept> #endif namespace uavcan { void handleFatalError(const char* msg) { #if UAVCAN_EXCEPTIONS throw std::runtime_error(msg); #else (void)msg; UAVCAN_ASSERT(0); std::abort(); #endif } }