]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
forbrun: Handle errors in test_client
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Feb 2011 22:32:40 +0000 (23:32 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Feb 2011 22:32:59 +0000 (23:32 +0100)
src/forbrun/tests/test_client.c

index 55fa01d579f31c5188f64894d990907f5dc2c398..4329b957bad5c1c9f23c3cda197e316ae5614471 100644 (file)
@@ -1,11 +1,14 @@
 #include <forb.h>
 #include "test_obj.h"
 #include <stdio.h>
+#include <error.h>
 
 int forb_main(forb_orb orb, int argc, char *argv[])
 {
        CORBA_Environment ev;
        test_obj obj = forb_resolve_reference(orb, "mytestobj");
+       if (!obj)
+               error(1, 0, "Unable to resolve mytestobj reference");
        test_obj_printmsg(obj, &ev);
        return 0;
 }