int errint;
gchar *s,*sd,*se;
gboolean errbool;
+const gchar *ior_read_error;
/* Initialize /tmp/orbit-$username directory for linking IOR socket. */
errbool=corba_init("captive-sandbox-parent",&captive_corba_ev,&captive_corba_orb,&captive_corba_poa);
data=captive_rtl_file_read(Vfs_IOR_fd_read,&data_size); /* data_fd_read */
errint=close(Vfs_IOR_fd_read);
- g_assert(errint==0);
- g_assert(data!=NULL);
- g_assert(data_size>=1);
- g_assert(data[data_size-1]=='\n');
+ ior_read_error=NULL;
+#define IOR_READ_ERROR(cond) G_STMT_START { \
+ if (!ior_read_error && !(cond)) \
+ ior_read_error=G_STRINGIFY(cond); \
+ } G_STMT_END
+ IOR_READ_ERROR(errint==0);
+ IOR_READ_ERROR(data!=NULL);
+ IOR_READ_ERROR(data_size>=1);
+ IOR_READ_ERROR(data[data_size-1]=='\n');
+ if (ior_read_error)
+ g_error(_("Error connecting to the sandbox server (failed \"%s\"). Try running by hand: %s"),
+ ior_read_error,CAPTIVE_VFS_OBJECT(captive_vfs_parent_object)->options.sandbox_server_argv[0]);
+#undef IOR_READ_ERROR
hash=g_hash_table_new(g_str_hash,g_str_equal);