rename
This commit is contained in:
parent
cc1e5e927c
commit
9cef606397
24 changed files with 0 additions and 0 deletions
32
driver/drv/driverexception.h
Normal file
32
driver/drv/driverexception.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef DRIVEREXCEPTION_H
|
||||
#define DRIVEREXCEPTION_H
|
||||
|
||||
#include <exception>
|
||||
|
||||
// SOURCE: https://stackoverflow.com/a/8152888
|
||||
|
||||
class DriverException: public std::exception
|
||||
{
|
||||
public:
|
||||
explicit DriverException(const char* message) : msg_(message)
|
||||
{
|
||||
}
|
||||
|
||||
explicit DriverException(const std::string& message) : msg_(message)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DriverException() throw ()
|
||||
{
|
||||
}
|
||||
|
||||
virtual const char* what() const throw ()
|
||||
{
|
||||
return msg_.c_str();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::string msg_;
|
||||
};
|
||||
|
||||
#endif // DRIVEREXCEPTION_H
|
Loading…
Add table
Add a link
Reference in a new issue