[PATCH himitsu] hiq: better error msg for himitsud not running
Export this patch
Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
cmd/hiq/main.ha | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmd/hiq/main.ha b/cmd/hiq/main.ha
index 04a107d..1e1b435 100644
--- a/cmd/hiq/main.ha
+++ b/cmd/hiq/main.ha
@@ -1,5 +1,6 @@
use bufio;
use dirs;
+use errors;
use fmt;
use getopt;
use himitsu::query;
@@ -85,8 +86,10 @@ export fn main() void = {
let conn = match (unix::connect(sockpath)) {
case let s: io::file =>
yield s;
+ case errors::noentry =>
+ fmt::fatal("error: himitsud isn't running");
case let e: net::error =>
- fmt::fatal(net::strerror(e));
+ fmt::fatal("error:", net::strerror(e));
};
defer io::close(conn)!;
--
2.35.1
Thanks!
To git@git.sr.ht:~sircmpwn/himitsu
91b9f28..cc9801f master -> master