تخطَّ إلى المحتوى

Rethrow Loses Context (ARCH9154)

هذا المحتوى غير متوفر بلغتك بعد.

Key swift.logging.rethrow-loses-stack-trace · Severity warning · Category logging

Flags throwing a new error inside a catch block without carrying the caught error.

catch { throw RepositoryError.loadFailed }
catch { throw RepositoryError.loadFailed(underlying: error) }

Wrap the original error so the cause survives.