/usr/include/shogun/lib/tapkee/exceptions.hpp is in libshogun-dev 3.2.0-7.5.
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 | /* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Copyright (c) 2012-2013 Sergey Lisitsyn
*/
#ifndef TAPKEE_EXCEPTIONS_H_
#define TAPKEE_EXCEPTIONS_H_
#include <stdexcept>
#include <string>
namespace tapkee
{
//! An exception type that is thrown in case if wrong parameter
//! value is passed.
class wrong_parameter_error : public std::logic_error
{
public:
/** @param what_msg message of the exception */
explicit wrong_parameter_error(const std::string& what_msg) :
std::logic_error(what_msg) {};
};
//! An exception type that is thrown in case if wrong parameter
//! value is passed.
class wrong_parameter_type_error : public std::logic_error
{
public:
/** @param what_msg message of the exception */
explicit wrong_parameter_type_error(const std::string& what_msg) :
std::logic_error(what_msg) {};
};
//! An exception type that is thrown in case of missed parameter,
//! i.e. when some required parameter is not set.
class missed_parameter_error : public std::logic_error
{
public:
/** @param what_msg message of the exception */
explicit missed_parameter_error(const std::string& what_msg) :
std::logic_error(what_msg) {};
};
//! An exception type that is thrown when unsupported method
//! is called.
class unsupported_method_error : public std::logic_error
{
public:
/** @param what_msg message of the exception */
explicit unsupported_method_error(const std::string& what_msg) :
std::logic_error(what_msg) {};
};
//! An exception type that is thrown when the library can't get
//! enough memory.
class not_enough_memory_error : public std::runtime_error
{
public:
/** @param what_msg message of the exception */
explicit not_enough_memory_error(const std::string& what_msg) :
std::runtime_error(what_msg) {};
};
//! An exception type that is thrown when some parameter is passed more than once
class multiple_parameter_error : public std::runtime_error
{
public:
/** @param what_msg message of the exception */
explicit multiple_parameter_error(const std::string& what_msg) :
std::runtime_error(what_msg) {};
};
//! An exception type that is thrown when computations were
//! cancelled.
class cancelled_exception : public std::exception
{
public:
explicit cancelled_exception() :
std::exception() {};
};
//! An exception type that is thrown when eigendecomposition
//! is failed.
class eigendecomposition_error : public std::runtime_error
{
public:
/** @param what_msg message of the exception */
explicit eigendecomposition_error(const std::string& what_msg) :
std::runtime_error(what_msg) {};
};
}
#endif
|