From 9e85a415cebcb29f583e8b586b80a22392760e54 Mon Sep 17 00:00:00 2001 From: Andrea Fontana Date: Fri, 24 May 2024 17:30:13 +0200 Subject: [PATCH] Better error message on start --- source/serverino/daemon.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/serverino/daemon.d b/source/serverino/daemon.d index ca07408..431cc12 100644 --- a/source/serverino/daemon.d +++ b/source/serverino/daemon.d @@ -435,7 +435,7 @@ package: import core.stdc.stdlib : exit, EXIT_FAILURE; import std.stdio : stderr; - string msg = "Can't listen on %s. Are you allowed to listen on this port? Is port already used by another process?".format(listener.address.toString); + string msg = "Can't listen on %s. %s".format(listener.address.toString, se.msg); version(Posix) { @@ -455,7 +455,7 @@ package: if (exists("/proc/" ~ pid[$-1] ~ "/cmdline")) cmdLine = readText("/proc/" ~ pid[$-1] ~ "/cmdline"); - msg = "Can't listen on %s. This port is already used by another process (PID: %s; NAME: %s).".format(listener.address.toString, pid[$-1], cmdLine); + msg = "Can't listen on %s. This address is already in use by `%s` (PID: %s).".format(listener.address.toString, cmdLine, pid[$-1]); } }