2 * Copyright (C) 2005 Casper S. Hornstrup
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 Exception ( const std::string
& message
);
28 Exception ( const char* format
,
30 const std::string
& operator *() { return _e
; }
34 void SetMessage ( const char* message
, ... );
35 void SetMessageV ( const char* message
, va_list args
);
42 class MissingArgumentException
: public Exception
45 MissingArgumentException ( const std::string
& argument
);
49 class InvalidOperationException
: public Exception
52 InvalidOperationException ( const char* filename
,
53 const int linenumber
);
54 InvalidOperationException ( const char* filename
,
61 class OutOfMemoryException
: public Exception
64 OutOfMemoryException ();
68 class FileNotFoundException
: public Exception
71 FileNotFoundException ( const std::string
& filename
);
76 class AccessDeniedException
: public Exception
79 AccessDeniedException ( const std::string
& filename
);
83 class InvalidDateException
: public Exception
86 InvalidDateException ( const std::string
& filename
);
90 class RequiredAttributeNotFoundException
: public XMLInvalidBuildFileException
93 RequiredAttributeNotFoundException ( const std::string
& location
,
94 const std::string
& attributeName
,
95 const std::string
& elementName
);
99 class InvalidAttributeValueException
: public XMLInvalidBuildFileException
102 InvalidAttributeValueException ( const std::string
& location
,
103 const std::string
& name
,
104 const std::string
& value
);
108 class BackendNameConflictException
: public Exception
111 BackendNameConflictException ( const std::string
& name
);
115 class UnknownBackendException
: public Exception
118 UnknownBackendException ( const std::string
& name
);
121 class UnknownModuleTypeException
: public XMLInvalidBuildFileException
124 UnknownModuleTypeException ( const std::string
& location
,
129 class InvocationFailedException
: public Exception
132 InvocationFailedException ( const std::string
& command
,
139 class UnsupportedBuildToolException
: public Exception
142 UnsupportedBuildToolException ( const std::string
& buildtool
,
143 const std::string
& version
);
144 std::string BuildTool
;
148 #endif /* __EXCEPTION_H */