Add name of unknown error instead of generic string

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2025-05-31 11:04:46 +02:00
parent 36a27f6167
commit a8b8292318
20 changed files with 1 additions and 20 deletions

View File

@@ -44,7 +44,6 @@ err_perm_user: []const u8 = "failed to downgrade user permissions",
err_pwnam: []const u8 = "failed to get user info",
err_sleep: []const u8 = "failed to execute sleep command",
err_tty_ctrl: []const u8 = "tty control transfer failed",
err_unknown: []const u8 = "an unknown error occurred",
err_user_gid: []const u8 = "failed to set user GID",
err_user_init: []const u8 = "failed to initialize user",
err_user_uid: []const u8 = "failed to set user UID",

View File

@@ -962,6 +962,6 @@ fn getAuthErrorMsg(err: anyerror, lang: Lang) []const u8 {
error.PamSystemError => lang.err_pam_sys,
error.PamUserUnknown => lang.err_pam_user_unknown,
error.PamAbort => lang.err_pam_abort,
else => lang.err_unknown,
else => @errorName(err),
};
}