Added automagic constructor inheritance.
This commit is contained in:
@@ -7,11 +7,13 @@ using namespace nb;
|
||||
|
||||
class TestError : public ErrorBase<TestError> {
|
||||
public:
|
||||
TestError(unsigned int code, unsigned int line=0, const std::string& filename="")
|
||||
: ErrorBase<TestError>(code, ErrorBase<TestError>::lookup(code)) {}
|
||||
TestError(unsigned int code, const std::exception& trace, unsigned int line=0, const std::string& filename="")
|
||||
: ErrorBase<TestError>(code, ErrorBase<TestError>::lookup(code), trace, line, filename) {}
|
||||
//TestError(unsigned int code, unsigned int line=0, const std::string& filename="")
|
||||
// : ErrorBase<TestError>(code, ErrorBase<TestError>::lookup(code)) {}
|
||||
//TestError(unsigned int code, const std::exception& trace, unsigned int line=0, const std::string& filename="")
|
||||
// : ErrorBase<TestError>(code, ErrorBase<TestError>::lookup(code), trace, line, filename) {}
|
||||
|
||||
using ErrorBase<TestError>::ErrorBase;
|
||||
|
||||
enum ErrorCodes : unsigned int {
|
||||
A, B, C, D
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user