source: orange/source/orange/errors.hpp @ 10887:43fcaa1ba432

Revision 10887:43fcaa1ba432, 1.4 KB checked in by Bobby Powers <bobby@…>, 2 years ago (diff)

headers: clean up #includes

This both reduces noise and fixes a build error from my distro's gcc
4.7.

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#include "px/orange_globals.hpp"
26
27using namespace std;
28
29extern bool exhaustiveWarnings;
30
31#ifdef _MSC_VER
32#define mlexception exception
33#else
34class mlexception : public exception {
35public:
36   string err_desc;
37
38   mlexception(const string &desc)
39   : err_desc(desc)
40   {}
41
42   ~mlexception() throw()
43   {}
44
45   virtual const char* what () const throw()
46   { return err_desc.c_str(); };
47};
48#endif
49
50void ORANGE_API raiseError(const char *anerr, ...);
51void ORANGE_API raiseErrorWho(const char *who, const char *anerr, ...);
52
53#endif
54
Note: See TracBrowser for help on using the repository browser.