Fix crash on startup if an LV2 plugin has a bad .ttl file.
[ardour.git] / libs / glibmm2 / gio / src / error.hg
1 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
3 /* Copyright (C) 2007 The giomm Development Team
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 #include <glibmm/interface.h>
21
22 // There have been issues with other libraries defining HOST_NOT_FOUND (e.g.
23 // netdb.h).  As a workaround, we added the alternate name HOST_WAS_NOT_FOUND.
24 // Portable code should not use HOST_NOT_FOUND.  Undefining it here (and
25 // restoring it below) will allow programs to compile even if they include
26 // netdb.h.  See Bug #529496
27 #ifdef HOST_NOT_FOUND
28 #define GIOMM_SAVED_HOST_NOT_FOUND HOST_NOT_FOUND
29 #undef HOST_NOT_FOUND
30 #endif // HOST_NOT_FOUND
31
32 _DEFS(giomm,gio)
33 _PINCLUDE(glibmm/private/interface_p.h)
34
35 namespace Gio
36 {
37
38 //Note that GIOErrorEnum is not named GIOError in gio because there is already a GIOError in glib,
39 //But we can have both Glib::Error and Gio::Error in C++.
40
41 /** Exception class for giomm errors.
42  */
43 _WRAP_GERROR(Error, GIOErrorEnum, G_IO_ERROR, NO_GTYPE)
44
45
46 } // namespace Gio
47
48 #ifdef GIOMM_SAVED_HOST_NOT_FOUND
49 // restore the previously-defined HOST_NOT_FOUND macro
50 #define HOST_NOT_FOUND GIOMM_SAVED_HOST_NOT_FOUND
51 #undef GIOMM_SAVED_HOST_NOT_FOUND
52 #endif // GIOMM_SAVED_HOST_NOT_FOUND