aboutsummaryrefslogtreecommitdiff
path: root/Exception.h
blob: 8f4ba4fcf619845a5078dc186ccdaf60351b1411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <cstdarg>
#include <exception>

class Exception : public std::exception {
public:
	Exception(const char * fmt, ...);
	virtual ~Exception();
	virtual const char * what();

protected:
	Exception() = default;
	void va_format(va_list args, const char * fmt);
	char * error = NULL;
};

class ParserException : public Exception {
public:
	ParserException(const char * fmt, ...);
};

class CircuitException : public Exception {
public:
	CircuitException(const char * fmt, ...);
};