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"
36 * Base class for exceptions in Vasum Server
38 struct ServerException: public VasumException {
40 explicit ServerException(const std::string& error) : VasumException(error) {}
44 * Error occurred during an attempt to perform an operation on a zone,
45 * e.g. start, stop a zone
47 struct ZoneOperationException: public ServerException {
49 explicit ZoneOperationException(const std::string& error) : ServerException(error) {}
55 struct InvalidZoneIdException : public ServerException {
57 explicit InvalidZoneIdException(const std::string& error) : ServerException(error) {}
61 * Exception during performing an operation on a zone connection
63 struct ZoneConnectionException: public ServerException {
65 explicit ZoneConnectionException(const std::string& error) : ServerException(error) {}
69 * Exception during performing an operation on a host connection
71 struct HostConnectionException: public ServerException {
73 explicit HostConnectionException(const std::string& error) : ServerException(error) {}
77 * Exception during performing an operation by input monitor,
78 * e.g. create channel, register callback etc.
80 struct InputMonitorException: public ServerException {
82 explicit InputMonitorException(const std::string& error) : ServerException(error) {}
85 struct TimeoutException: public InputMonitorException {
87 explicit TimeoutException(const std::string& error) : InputMonitorException (error) {}
93 #endif // SERVER_EXCEPTION_HPP