+#include <libspi/accessible.h>
+#include <libspi/listener.h>
+
+void
+check_ev (CORBA_Environment *ev, char *desc)
+{
+ if (ev->_major != CORBA_NO_EXCEPTION) {
+ fprintf(stderr,
+ ("Accessibility app error: exception during CORBA call %s (%s)\n"),
+ CORBA_exception_id(ev), desc);
+ CORBA_exception_free(ev);
+ exit(-1);
+ }
+}