Files
PX4-Autopilot/libuavcan_drivers/linux/include/uavcan_linux/exception.hpp
T
2014-03-29 19:44:16 +04:00

27 lines
375 B
C++

/*
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#pragma once
#include <cerrno>
#include <stdexcept>
namespace uavcan_linux
{
class Exception : public std::runtime_error
{
int errno_;
public:
Exception(const char* descr)
: std::runtime_error(descr)
, errno_(errno)
{ }
int getErrno() const { return errno_; }
};
}