Re: [PATCHv3] daemon: give friendlier error messages to clients

From
Nguyen Thai Ngoc Duy <hidden>
Date
2016-06-15 22:52:16
Reply to
Jeff King, 2016-06-15
On Sat, Oct 15, 2011 at 8:19 AM, Jeff King [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -257,11 +266,11 @@ static int run_service(char *dir, struct daemon_service *service)
       if (!enabled && !service->overridable) {
               logerror("'%s': service not enabled.", service->name);
               errno = EACCES;
-               return -1;
+               return daemon_error(dir, "service not enabled");
       }
Nit picking. In this case the service is disabled entirely regardless
dir and it uses the same message with the case where service is
disabled per repo later on. Maybe we could reword it a little bit to
differentiate the two cases? Say the first case "service disabled",
and the second one "service not enabled"?
-- 
Duy
Thread (26 messages) 26 messages, 6 authors, last reply 2016-06-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help