handle errors and use eina error print.
authorCarsten Haitzler <raster@rasterman.com>
Wed, 18 Feb 2009 00:29:07 +0000 (00:29 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 18 Feb 2009 00:29:07 +0000 (00:29 +0000)
SVN revision: 39066

src/lib/elm_main.c
src/lib/elm_win.c

index 2556704..a142f5c 100644 (file)
@@ -214,7 +214,11 @@ elm_init(int argc, char **argv)
 #ifdef HAVE_ELEMENTARY_X
        int val = 1000;
        
-       ecore_x_init(NULL);
+       if (!ecore_x_init(NULL))
+          {
+             EINA_ERROR_PERR("elementary: ERROR. Cannot connect to X11 display. check $DISPLAY variable\n");
+             exit(1);
+          }
        if (!ecore_x_screen_is_composited(0))
          _elm_config->compositing = 0;
         _elm_atom_enlightenment_scale = ecore_x_atom_get("ENLIGHTENMENT_SCALE");
index 905c0fa..76c124b 100644 (file)
@@ -281,7 +281,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
      }
    if (!win->ee)
      {
-       printf("ELEMENTARY: Error. Cannot create window.\n");
+       EINA_ERROR_PERR("elementary: ERROR. Cannot create window.\n");
        free(win);
        return NULL;
      }