source: orange/source/orange/errors.hpp @ 6531:57bdc92cd8e9

Revision 6531:57bdc92cd8e9, 1.4 KB checked in by janezd <janez.demsar@…>, 4 years ago (diff)
  • changed licenses to GPL 3.0
Line 
1/*
2    This file is part of Orange.
3   
4    Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana
5    Contact: janez.demsar@fri.uni-lj.si
6
7    Orange is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11
12    Orange is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with Orange.  If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef __ERRORS_HPP
22#define __ERRORS_HPP
23
24#include <string>
25
26using namespace std;
27
28extern bool exhaustiveWarnings;
29
30#ifdef _MSC_VER
31#define mlexception exception
32#else
33class mlexception : public exception {
34public:
35   string err_desc;
36
37   mlexception(const string &desc)
38   : err_desc(desc)
39   {}
40
41   ~mlexception() throw()
42   {}
43
44   virtual const char* what () const throw()
45   { return err_desc.c_str(); };
46};
47#endif
48
49#include "garbage.hpp"
50
51void ORANGE_API raiseError(const char *anerr, ...);
52void ORANGE_API raiseErrorWho(const char *who, const char *anerr, ...);
53
54#endif
55
Note: See TracBrowser for help on using the repository browser.