Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
1531-Improve-error-handling.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1531-Improve-error-handling.patch of Package erlang
From f2599b48f092f6d84c6606a2ce849bd69c8b4069 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson <dgud@erlang.org> Date: Thu, 15 Aug 2024 09:11:07 +0200 Subject: [PATCH] Improve error handling Could return undefined if no files where present. --- lib/public_key/src/pubkey_os_cacerts.erl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/public_key/src/pubkey_os_cacerts.erl b/lib/public_key/src/pubkey_os_cacerts.erl index 2cc028be5f..6fa5fdb9a6 100644 --- a/lib/public_key/src/pubkey_os_cacerts.erl +++ b/lib/public_key/src/pubkey_os_cacerts.erl @@ -54,19 +54,20 @@ get() -> %% (Re)Load default os cacerts and cache result. -spec load() -> ok | {error, Reason::term()}. load() -> + DefError = {error, no_cacerts_found}, case os:type() of {unix, linux} -> - load(linux_paths(), undefined); + load(linux_paths(), DefError); {unix, openbsd} -> - load(bsd_paths(), undefined); + load(bsd_paths(), DefError); {unix, freebsd} -> - load(bsd_paths(), undefined); + load(bsd_paths(), DefError); {unix, dragonfly} -> - load(bsd_paths(), undefined); + load(bsd_paths(), DefError); {unix, netbsd} -> - load(bsd_paths(), undefined); + load(bsd_paths(), DefError); {unix, sunos} -> - load(sunos_paths(), undefined); + load(sunos_paths(), DefError); {win32, _} -> load_win32(); {unix, darwin} -> -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor