Let frontend handle error in example program instead of handling it
[cascardo/atompub.git] / src / main.c
index 6491ee8..a47a352 100644 (file)
@@ -40,8 +40,8 @@ main (int argc, char **argv)
   atom_frontend_set (ctx, cgi_frontend ());
   if ((error = atom_error_get (ctx)) != NULL)
     {
-      g_message ("%s\n", atom_error_message (error));
-      exit (1);
+      atom_handle_error (ctx);
+      exit (0);
     }
   atom_backend_enumerate_entries (ctx, NULL, NULL, NULL);
   atom_serve_request (ctx);