]> git.proxmox.com Git - pve-common.git/commit
ldap: handle errors explicitly everywhere instead of simply `die`ing
authorChristoph Heiss <c.heiss@proxmox.com>
Thu, 10 Aug 2023 12:37:05 +0000 (14:37 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 11 Aug 2023 11:21:13 +0000 (13:21 +0200)
commit10de5bfc2ae13a13265815b4172e994d913d0926
tree89d92042d879b1f7e03b70880d945d23ff1e91ea
parent4bb9bfe70b21f3d4c4e8e4dca7ffc08c95e65f6e
ldap: handle errors explicitly everywhere instead of simply `die`ing

Most codepaths already have explicit error handling (by the means of
checking the return value), which is essential dead code due to setting
`onerror`.

As LDAP errors might get presented to users due to upcoming changes, the
error location should not be present in these error messages, thus
switch to explicit handling.

Only two calls were missing such explicit handling of errors, so these
are amended as appropriate. Further, some `die`s were missing newlines
at the end of the message, which - again - would cause the error
location to be included.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
src/PVE/LDAP.pm