Skip to content

fix: Preserve RuntimeError messages in localizedDescription - #1657

Merged
mrousavy merged 1 commit into
mainfrom
fix/runtime-error-localized-description
Sep 22, 2026
Merged

mrousavy merged 1 commit into
mainfrom
fix/runtime-error-localized-description

Conversation

@mrousavy

Copy link
Copy Markdown
Member

Calling error.localizedDescription on a caught RuntimeError currently returns Foundation's generic "The operation couldn’t be completed" message instead of the stored error message.

Make RuntimeError conform to LocalizedError and return its existing description from errorDescription. This preserves the message through Error and NSError without changing logging call sites or C++ error conversion.

Validated by compiling the actual Swift source and C++ exception helpers and running smoke checks for Error.localizedDescription, NSError.localizedDescription, catch blocks, string descriptions, and C++ round-trips, including empty and Unicode messages. git diff --check passes.

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
nitro-docs Skipped Skipped Sep 22, 2026 12:14pm UTC

Request Review

@mrousavy
mrousavy merged commit 85c69e3 into main Sep 22, 2026
6 of 9 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 30f0ed4e Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant