exceptions.h 1.13 KB
Newer Older
beder's avatar
beder committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include <exception>

namespace YAML
{
	class Exception: public std::exception {};

	class UnknownToken: public Exception {};
	class IllegalBlockEntry: public Exception {};
	class IllegalMapKey: public Exception {};
	class IllegalMapValue: public Exception {};
	class IllegalScalar: public Exception {};
beder's avatar
beder committed
14
	class IllegalTabInScalar: public Exception {};
beder's avatar
beder committed
15
	class IllegalFlowEnd: public Exception {};
beder's avatar
beder committed
16
17
	class DocIndicatorInQuote: public Exception {};
	class EOFInQuote: public Exception {};
beder's avatar
beder committed
18
	class RequiredSimpleKeyNotFound: public Exception {};
beder's avatar
beder committed
19
20
	class ZeroIndentationInBlockScalar: public Exception {};
	class UnexpectedCharacterInBlockScalar: public Exception {};
beder's avatar
beder committed
21
22
	class AnchorNotFound: public Exception {};
	class IllegalCharacterInAnchor: public Exception {};
beder's avatar
beder committed
23

beder's avatar
beder committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	class UnknownEscapeSequence: public Exception {
	public:
		UnknownEscapeSequence(char ch_): ch(ch_) {}
		char ch;
	};
	class NonHexNumber: public Exception {
	public:
		NonHexNumber(char ch_): ch(ch_) {}
		char ch;
	};
	class InvalidUnicode: public Exception {
	public:
		InvalidUnicode(unsigned value_): value(value_) {}
		unsigned value;
	};
beder's avatar
beder committed
39
}