8 Exception::Exception ()
12 Exception::Exception ( const string
& message
)
17 Exception::Exception ( const char* format
,
23 Message
= ssvprintf ( format
,
28 void Exception::SetMessage ( const char* message
,
31 Message
= ssvprintf ( message
,
36 OutOfMemoryException::OutOfMemoryException ()
37 : Exception ( "Out of memory" )
42 InvalidOperationException::InvalidOperationException ( const char* filename
,
43 const int linenumber
)
45 Message
= ssprintf ( "%s:%d",
50 InvalidOperationException::InvalidOperationException ( const char* filename
,
59 errorMessage
= ssvprintf ( message
,
62 Message
= ssprintf ( "%s:%d %s",
65 errorMessage
.c_str () );
69 FileNotFoundException::FileNotFoundException ( const string
& filename
)
70 : Exception ( "File '%s' not found.",
77 AccessDeniedException::AccessDeniedException ( const string
& filename
)
78 : Exception ( "Access denied to file or directory '%s'.",
85 InvalidBuildFileException::InvalidBuildFileException ( const string
& location
,
92 SetLocationMessage ( location
, message
, args
);
96 InvalidBuildFileException::InvalidBuildFileException ()
101 InvalidBuildFileException::SetLocationMessage ( const std::string
& location
,
105 Message
= location
+ ": " + ssvprintf ( message
, args
);
108 XMLSyntaxErrorException::XMLSyntaxErrorException ( const string
& location
,
115 SetLocationMessage ( location
, message
, args
);
120 RequiredAttributeNotFoundException::RequiredAttributeNotFoundException (
121 const string
& location
,
122 const string
& attributeName
,
123 const string
& elementName
)
124 : InvalidBuildFileException ( location
,
125 "Required attribute '%s' not found on '%s'.",
126 attributeName
.c_str (),
127 elementName
.c_str ())
131 InvalidAttributeValueException::InvalidAttributeValueException (
132 const string
& location
,
134 const string
& value
)
135 : InvalidBuildFileException ( location
,
136 "Attribute '%s' has an invalid value '%s'.",
143 BackendNameConflictException::BackendNameConflictException ( const string
& name
)
144 : Exception ( "Backend name conflict: '%s'",
150 UnknownBackendException::UnknownBackendException ( const string
& name
)
151 : Exception ( "Unknown Backend requested: '%s'",
157 UnknownModuleTypeException::UnknownModuleTypeException ( const string
& location
,
159 : InvalidBuildFileException ( location
,
160 "module type requested: %i",
166 InvocationFailedException::InvocationFailedException ( const std::string
& command
,
168 : Exception ( "Failed to execute '%s' (exit code %d)",