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 InvalidOperationException
: public Exception
45 InvalidOperationException ( const char* filename
,
46 const int linenumber
);
47 InvalidOperationException ( const char* filename
,
54 class OutOfMemoryException
: public Exception
57 OutOfMemoryException ();
61 class FileNotFoundException
: public Exception
64 FileNotFoundException ( const std::string
& filename
);
69 class AccessDeniedException
: public Exception
72 AccessDeniedException ( const std::string
& filename
);
77 class RequiredAttributeNotFoundException
: public XMLInvalidBuildFileException
80 RequiredAttributeNotFoundException ( const std::string
& location
,
81 const std::string
& attributeName
,
82 const std::string
& elementName
);
86 class InvalidAttributeValueException
: public XMLInvalidBuildFileException
89 InvalidAttributeValueException ( const std::string
& location
,
90 const std::string
& name
,
91 const std::string
& value
);
95 class BackendNameConflictException
: public Exception
98 BackendNameConflictException ( const std::string
& name
);
102 class UnknownBackendException
: public Exception
105 UnknownBackendException ( const std::string
& name
);
108 class UnknownModuleTypeException
: public XMLInvalidBuildFileException
111 UnknownModuleTypeException ( const std::string
& location
,
116 class InvocationFailedException
: public Exception
119 InvocationFailedException ( const std::string
& command
,
126 class UnsupportedBuildToolException
: public Exception
129 UnsupportedBuildToolException ( const std::string
& buildtool
,
130 const std::string
& version
);
131 std::string BuildTool
;
135 #endif /* __EXCEPTION_H */