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
uc_error.cpp
00001 /* 00002 * Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com> 00003 */ 00004 00005 #include <uavcan/error.hpp> 00006 #include <cassert> 00007 #include <cstdlib> 00008 00009 #ifndef UAVCAN_EXCEPTIONS 00010 # error UAVCAN_EXCEPTIONS 00011 #endif 00012 00013 #if UAVCAN_EXCEPTIONS 00014 # include <stdexcept> 00015 #endif 00016 00017 namespace uavcan 00018 { 00019 00020 void handleFatalError(const char* msg) 00021 { 00022 #if UAVCAN_EXCEPTIONS 00023 throw std::runtime_error(msg); 00024 #else 00025 (void)msg; 00026 UAVCAN_ASSERT(0); 00027 std::abort(); 00028 #endif 00029 } 00030 00031 }
Generated on Tue Jul 12 2022 17:17:35 by
