mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:33:33 +08:00
Linux clock driver
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* 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_; }
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user