Feature Selection Toolbox FST4
UTIA · Czech Academy of Sciences
Loading...
Searching...
No Matches
error.hpp
Go to the documentation of this file.
1#ifndef FSTERROR_H
2#define FSTERROR_H
3 /*
27=========================================================================
28Copyright and license:
29 * FST4 software (with the exception of any bundled or externally linked
30 third-party components) is Copyright (C) 2000-present Institute of
31 Information Theory and Automation of the Czech Academy of Sciences (UTIA).
32 * FST4 is free software: you can redistribute it and/or modify it under
33 the terms of the GNU Affero General Public License as published by the
34 Free Software Foundation, version 3. The full text of the license is in
35 the file LICENSE in the distribution root and at
36 https://www.gnu.org/licenses/agpl-3.0.html.
37 * FST4 is distributed in the hope that it will be useful, but WITHOUT ANY
38 WARRANTY; without even the implied warranty of MERCHANTABILITY or
39 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
40 License for more details.
41 * Closed-source use without the AGPL's copyleft obligations requires a
42 commercial license from UTIA; in case of interest write to
43 utia@utia.cas.cz. LICENSING.md in the distribution root explains both
44 options, the contributor license agreement that every contribution
45 requires, and the contacts (technical questions and pull requests:
46 somol@utia.cas.cz, with "FST" in the subject line).
47========================================================================== */
48
49#include <stdexcept>
50#include <string>
51
52namespace FST {
53
61class fst_error : public std::runtime_error {
62 public:
66 fst_error(const std::string& _err, const int _errcode=0) : std::runtime_error("[FST_ERROR!] "+_err), _code(_errcode) {}
67 int code() const {return _code;}
68 private:
69 const int _code;
70};
71
72} //namespace
73#endif // FSTERROR_H ///:~
fst_error(const std::string &_err, const int _errcode=0)
Constructs the error, prefixing _err with "[FST_ERROR!] " for the inherited std::runtime_error::what(...
Definition error.hpp:66
const int _code
numeric error code supplied at construction
Definition error.hpp:69
int code() const
returns the numeric error code supplied at construction (0 if none was given)
Definition error.hpp:67
The Feature Selection Toolbox 4 library: every library component – data access, criteria and classifi...
Definition data_accessor.hpp:80
Copyright © 2000–present ÚTIA, Institute of Information Theory and Automation of the Czech Academy of Sciences · Contacts · This site sets no cookies and uses no analytics.