From 34711e560447c955a2a4bdd2fd04178bf7099e0c Mon Sep 17 00:00:00 2001 From: Cedric RICARD Date: Wed, 10 Oct 2007 23:32:46 +0000 Subject: [PATCH] Adding some error codes --- calexium_lib/CXM_errors.anubis | 6 +++++- calexium_lib/web/CXM_multihost_http_server.anubis | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/calexium_lib/CXM_errors.anubis b/calexium_lib/CXM_errors.anubis index 88d50a6..017b2ad 100644 --- a/calexium_lib/CXM_errors.anubis +++ b/calexium_lib/CXM_errors.anubis @@ -16,7 +16,9 @@ public type GeneralError: no_init, unknown_command, wrong_authentification, // Wrong login or password - access_denied. // login ok but no suffisiant right to access to this area. Can be use with wrong authentification too... + access_denied, // login ok but no suffisiant right to access to this area. Can be use with wrong authentification too... + io_error, // general error on reading or writing from/to IO (file, socket, etc...) + cant_start_process. // A execute to an external process has failed public define Int32 to_Int32 @@ -34,4 +36,6 @@ public define Int32 unknown_command then 0x5, wrong_authentification then 0x6, access_denied then 0x7, + io_error then 0x8, + cant_start_process then 0x9, }. diff --git a/calexium_lib/web/CXM_multihost_http_server.anubis b/calexium_lib/web/CXM_multihost_http_server.anubis index d98a23b..89661cd 100644 --- a/calexium_lib/web/CXM_multihost_http_server.anubis +++ b/calexium_lib/web/CXM_multihost_http_server.anubis @@ -2928,9 +2928,12 @@ define Maybe((String,Web_Site_Description)) //here we treat the case with only one site. hence we accept any host request //print("*** there is " +length(sites) + " sites \n"); if length(sites) = 1 then - with site = force_nth(0, sites), - //print("ONE server OK\n"); - success((requested_host, site)) + //with site = force_nth(0, sites), + if sites is + { + [] then get_site(requested_host,sites), + [site . t] then success((requested_host, site)) + } else get_site(requested_host,sites) }. -- libgit2 0.21.4