#pragma once

#include "compat.h"
#include "Types.h"
#include "Macros.h"

class CException {
public:
	CException(unsigned int code) {
		this->setCode(code);
		this->setErrorString(NULL);
		this->setAssociatedCode(0);
	}
	CException(unsigned int code, char *str) {
		this->setCode(code);
		this->setErrorString(str);
		this->setAssociatedCode(0);
	}
	CException(unsigned int code, char *str, unsigned int asc_code) {
		this->setCode(code);
		this->setErrorString(str);
		this->setAssociatedCode(asc_code);
	}
	DECLARE_MEMBER(unsigned int, AssociatedCode); 
	DECLARE_MEMBER(unsigned int, Code);
	DECLARE_MEMBER(char *, ErrorString);
};