5574d63f7a8d5af00c0cf41b783fb62b83b9586f
[reactos.git] / reactos / tools / rbuild / exception.h
1 #ifndef __EXCEPTION_H
2 #define __EXCEPTION_H
3
4 #include "pch.h"
5
6 class Exception
7 {
8 public:
9 Exception ( const std::string& message );
10 Exception ( const char* format,
11 ...);
12 std::string Message;
13 protected:
14 Exception ();
15 void SetMessage ( const char* message,
16 va_list args);
17 };
18
19
20 class InvalidOperationException : public Exception
21 {
22 public:
23 InvalidOperationException ( const char* filename,
24 const int linenumber);
25 InvalidOperationException ( const char* filename,
26 const int linenumber,
27 const char* message,
28 ... );
29 };
30
31
32 class FileNotFoundException : public Exception
33 {
34 public:
35 FileNotFoundException ( const std::string& filename );
36 std::string Filename;
37 };
38
39
40 class AccessDeniedException : public Exception
41 {
42 public:
43 AccessDeniedException ( const std::string& filename );
44 std::string Filename;
45 };
46
47 class InvalidBuildFileException : public Exception
48 {
49 public:
50 InvalidBuildFileException ( const std::string& location,
51 const char* message,
52 ...);
53 void SetLocationMessage ( const std::string& location,
54 const char* message,
55 va_list args );
56 protected:
57 InvalidBuildFileException ();
58 };
59
60
61 class XMLSyntaxErrorException : public InvalidBuildFileException
62 {
63 public:
64 XMLSyntaxErrorException ( const std::string& location,
65 const char* message,
66 ... );
67 };
68
69
70 class RequiredAttributeNotFoundException : public InvalidBuildFileException
71 {
72 public:
73 RequiredAttributeNotFoundException ( const std::string& location,
74 const std::string& attributeName,
75 const std::string& elementName );
76 };
77
78
79 class InvalidAttributeValueException : public InvalidBuildFileException
80 {
81 public:
82 InvalidAttributeValueException ( const std::string& location,
83 const std::string& name,
84 const std::string& value );
85 };
86
87
88 class BackendNameConflictException : public Exception
89 {
90 public:
91 BackendNameConflictException ( const std::string& name );
92 };
93
94
95 class UnknownBackendException : public Exception
96 {
97 public:
98 UnknownBackendException ( const std::string& name );
99 };
100
101 class UnknownModuleTypeException : public InvalidBuildFileException
102 {
103 public:
104 UnknownModuleTypeException ( const std::string& location,
105 int moduletype );
106 };
107
108 #endif /* __EXCEPTION_H */