mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
15 lines
304 B
C++
15 lines
304 B
C++
/*
|
|
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdexcept>
|
|
|
|
#ifndef STRINGIZE
|
|
# define STRINGIZE2(x) #x
|
|
# define STRINGIZE(x) STRINGIZE2(x)
|
|
#endif
|
|
#define ENFORCE(x) if (!(x)) { throw std::runtime_error(__FILE__ ":" STRINGIZE(__LINE__) ": " #x); }
|
|
|