exceptions.h 530 Bytes
Newer Older
beder's avatar
beder committed
1
2
3
4
5
6
7
#pragma once

#include <exception>

namespace YAML
{
	class Exception: public std::exception {};
8
	class ParserException: public Exception {
beder's avatar
beder committed
9
	public:
10
11
12
13
		ParserException(int line_, int column_, const std::string& msg_)
			: line(line_), column(column_), msg(msg_) {}
		int line, column;
		std::string msg;
beder's avatar
beder committed
14
	};
15

16
	class RepresentationException: public Exception {};
beder's avatar
beder committed
17

18
19
20
	// representation exceptions
	class InvalidScalar: public RepresentationException {};
	class BadDereference: public RepresentationException {};
beder's avatar
beder committed
21
}