source: trunk/ORBit2-2.14.0/test/poa/poatest-exception.h

Last change on this file was 92, checked in by cinc, 19 years ago

Orbit2 modified for use with NOM

File size: 2.0 KB
Line 
1/*
2 * CORBA POA tests
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2, or (at your option) any
7 * later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * Author: Mark McLoughlin <mark@skynet.ie>
19 */
20
21#ifndef __POATEST_EXCEPTION_H__
22#define __POATEST_EXCEPTION_H__
23
24#include <stdio.h>
25#include <orbit/orbit.h>
26
27/*
28 * knackered from bonobo-exception.h
29 */
30#define POATEST_EX(ev) ((ev) && (ev)->_major != CORBA_NO_EXCEPTION)
31
32#define POATEST_PRINT_EX(str, ev) \
33 G_STMT_START { \
34 switch ((ev)->_major) { \
35 case CORBA_NO_EXCEPTION : \
36 fprintf (stderr, str "No exception.\n"); \
37 break; \
38 case CORBA_USER_EXCEPTION : \
39 fprintf (stderr, str "User Exception : %s\n", \
40 CORBA_exception_id ((ev))); \
41 break; \
42 case CORBA_SYSTEM_EXCEPTION : \
43 fprintf (stderr, str "System Exception : %s\n", \
44 CORBA_exception_id ((ev))); \
45 break; \
46 default : \
47 break; \
48 } \
49 } G_STMT_END;
50
51#endif /* __POATEST_EXCEPTION_H__ */
Note: See TracBrowser for help on using the repository browser.