1 /******************************************************************
\r
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
19 ******************************************************************/
\r
21 #ifndef RAML_EXCEPTIONS_H_
\r
22 #define RAML_EXCEPTIONS_H_
\r
24 #include <exception>
\r
25 #include "RamlErrorCodes.h"
\r
26 #include "yaml-cpp/exceptions.h"
\r
30 class RamlException : public std::exception
\r
33 RamlException(const std::string &message) : m_message(message) {}
\r
34 RamlException(const YAML::Mark &mark, const std::string &message): m_message(message),
\r
36 virtual const char *what() const noexcept;
\r
37 virtual ~RamlException() throw() {}
\r
40 std::string m_message;
\r
44 class RamlParserException : public RamlException
\r
47 RamlParserException(const std::string &message): RamlException(message) {}
\r
48 RamlParserException(const YAML::Mark &mark, const std::string &message): RamlException(mark,
\r
52 class RamlRepresentationException : public RamlException
\r
55 RamlRepresentationException(const std::string &message): RamlException(message) {}
\r
56 RamlRepresentationException(const YAML::Mark &mark, const std::string &message): RamlException(mark,
\r
60 class RamlBadFile : public RamlException
\r
63 RamlBadFile(const std::string &message) : RamlException(message) {}
\r
64 RamlBadFile(const YAML::Mark &mark, const std::string &message): RamlException(mark, message) {}
\r
66 class JsonException : public RamlException
\r
69 JsonException(const std::string &message) : RamlException(message) {}
\r