X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=src%2Ferror.c;h=a8e08e49cb30332e6a6dd2c3c2af54b7cf0c06b1;hb=032449048eaddbee3f02324d33979ba0f6aa2719;hp=cdb3178fc3a66e1e0e424c327588da2f3139ead8;hpb=e5aa144371213e68c98d6e25049bf8cb8965c07f;p=cascardo%2Fatompub.git diff --git a/src/error.c b/src/error.c index cdb3178..a8e08e4 100644 --- a/src/error.c +++ b/src/error.c @@ -20,6 +20,7 @@ #include #include +#include struct _atom_error { @@ -91,6 +92,18 @@ atom_error_new_from_gerror (GError *error) break; } } + else if (error->domain = G_IO_ERROR) + { + switch (error->code) + { + case G_IO_ERROR_NOT_FOUND: + aerr->code = 404; + break; + default: + aerr->code = 500; + break; + } + } else { aerr->code = 500;