exceptions.h 530 Bytes
Newer Older
Jesse Beder's avatar
Jesse 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 {
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;
14
	};
15

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

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