2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Contact: Jan Olszak <j.olszak@samsung.com>
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License
21 * @author Jan Olszak (j.olszak@samsung.com)
22 * @brief Exceptions for the server
26 #ifndef SERVER_EXCEPTION_HPP
27 #define SERVER_EXCEPTION_HPP
29 #include "base-exception.hpp"
32 namespace security_containers {
36 * Base class for exceptions in Security Containers Server
38 struct ServerException: public SecurityContainersException {
40 ServerException(const std::string& error = "") : SecurityContainersException(error) {}
44 * Error occurred during an attempt to perform an operation on a container,
45 * e.g. start, stop a container
47 struct ContainerOperationException: public ServerException {
49 ContainerOperationException(const std::string& error = "") : ServerException(error) {}
53 * Exception during performing an operation on a container connection
55 struct ContainerConnectionException: public ServerException {
57 ContainerConnectionException(const std::string& error = "") : ServerException(error) {}
61 * Exception during performing an operation on a host connection
63 struct HostConnectionException: public ServerException {
65 HostConnectionException(const std::string& error = "") : ServerException(error) {}
69 * Exception during performing an operation by input monitor,
70 * e.g. create channel, register callback etc.
72 struct InputMonitorException: public ServerException {
74 InputMonitorException(const std::string& error = "") : ServerException(error) {}
81 #endif // SERVER_EXCEPTION_HPP