mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 16:03:34 +01:00
a89752dfe7
git-svn-id: http://encfs.googlecode.com/svn/trunk@121 db9cf616-1c43-0410-9cb8-a902689de0d6
27 lines
579 B
C++
27 lines
579 B
C++
#ifndef _Error_incl_
|
|
#define _Error_incl_
|
|
|
|
#include <glog/logging.h>
|
|
#include <stdexcept>
|
|
|
|
namespace encfs {
|
|
|
|
class Error : public std::runtime_error {
|
|
public:
|
|
Error(const char *msg);
|
|
};
|
|
|
|
#define STR(X) #X
|
|
|
|
#define rAssert(cond) \
|
|
do { \
|
|
if ((cond) == false) { \
|
|
LOG(ERROR) << "Assert failed: " << STR(cond); \
|
|
throw Error(STR(cond)); \
|
|
} \
|
|
} while (0)
|
|
|
|
} // namespace encfs
|
|
|
|
#endif
|