/usr/include/xmms2/xmmsclient/xmmsclient++/exceptions.h is in libxmmsclient++-dev 0.8+dfsg-12.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | /* XMMS2 - X Music Multiplexer System
* Copyright (C) 2003-2011 XMMS2 Team
*
* PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
#ifndef XMMSCLIENTPP_EXCEPTIONS_H
#define XMMSCLIENTPP_EXCEPTIONS_H
#include <stdexcept>
#include <string>
namespace Xmms
{
// This should probably provide more methods like getFunction(), getLine() or something.
/** @class exception exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
* @brief Base class for all Xmms:: exceptions.
*
* @note Derive your exceptions from it if you want them to
* be handled by library in asynchronous situations.
*/
class exception
{
public:
virtual ~exception() throw() {}
};
// Someone kick doxygen for me please!, this line just can't be cut
/** @class connection_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
* @brief Thrown on connection error when connecting or when calling a
* function and not connected.
*/
class connection_error : public exception, public std::runtime_error
{
public:
explicit connection_error( const std::string& what_arg );
};
/** @class not_list_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
* @brief Thrown when trying to create a list from non-list resultset.
* @note Logic error, should <b>not</b> be caught, fix the code instead.
*/
class not_list_error : public exception, public std::logic_error
{
public:
explicit not_list_error( const std::string& what_arg );
};
/** @class result_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if the returned resultset was in error state.
*/
class result_error : public exception, public std::runtime_error
{
public:
explicit result_error( const std::string& what_arg );
};
/** @class value_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if the returned value is an error.
*/
class value_error : public exception, public std::runtime_error
{
public:
explicit value_error( const std::string& what_arg );
};
/** @class argument_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if the arguments passed to a method are invalid.
*/
class argument_error : public exception, public std::runtime_error
{
public:
explicit argument_error( const std::string& what_arg );
};
/** @class not_dict_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
* @brief Thrown when trying to create a dict from non-dict resultset.
* @note Logic error, should <b>not</b> be caught, fix the code instead.
*/
class not_dict_error : public exception, public std::logic_error
{
public:
explicit not_dict_error( const std::string& what_arg );
};
/** @class no_such_key_error exceptions.h "xmmsclient/xmmsclient/exceptions.h"
* @brief Thrown if trying to access a non-existant key in a Dict.
*/
class no_such_key_error : public exception, public std::runtime_error
{
public:
explicit no_such_key_error( const std::string& what_arg );
};
/** @class mainloop_running_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
* @brief Thrown when calling a synchronous function and the mainloop is
* running.
* @note Logic error, should <b>not</b> be caught, fix the code instead.
*/
class mainloop_running_error : public exception, public std::logic_error
{
public:
explicit mainloop_running_error( const std::string& what_arg );
};
/** @class wrong_type_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
* @brief Thrown from Dict::get if the type provided was wrong.
* @note Logic error, should <b>not</b> be caught, fix the code instead.
*/
class wrong_type_error : public exception, public std::logic_error
{
public:
explicit wrong_type_error( const std::string& what_arg );
};
/** @class missing_operand_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if trying to retrieve a non-existing operand of a coll operator.
*/
class missing_operand_error : public exception, public std::runtime_error
{
public:
explicit missing_operand_error( const std::string& what_arg );
};
/** @class out_of_range exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if accessing a List which is at the end or over.
* @note It's better to check for List validity
* than have this caught/thrown.
*/
class out_of_range : public exception, public std::out_of_range
{
public:
explicit out_of_range( const std::string& what_arg );
};
/** @class collection_type_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if trying to perform an operation forbidden by
* the type of the collection operator.
*/
class collection_type_error : public exception, public std::runtime_error
{
public:
explicit collection_type_error( const std::string& what_arg );
};
/** @class collection_operation_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if a collection operation failed.
*/
class collection_operation_error : public exception, public std::runtime_error
{
public:
explicit collection_operation_error( const std::string& what_arg );
};
/** @class collection_parsing_error exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if the parsing of a collection pattern failed.
*/
class collection_parsing_error : public exception, public std::runtime_error
{
public:
explicit collection_parsing_error( const std::string& what_arg );
};
/** @class invalid_url exceptions.h "xmmsclient/xmmsclient++/exceptions.h"
*
* @brief Thrown if an invalid url is used.
*/
class invalid_url : public exception, public std::runtime_error
{
public:
explicit invalid_url( const std::string& what_arg );
};
}
#endif // XMMSCLIENTPP_EXCEPTIONS_H
|