Skip to content

Commit

Permalink
Better error message on start
Browse files Browse the repository at this point in the history
  • Loading branch information
trikko committed May 24, 2024
1 parent 702f1b7 commit 9e85a41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/serverino/daemon.d
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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]);
}
}

Expand Down

0 comments on commit 9e85a41

Please sign in to comment.