You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a method Error.asDiagnostics(at:) to unpack errors into diagnostics
This is a useful convenience function to handle cases where we have a
thrown error from some API and we want to translate it into a
diagnostic that we need to emit at a particular location.
-`Error` protocol now has an `asDiagnostics(at:)` method.
15
+
- Description: This method translates an error into one or more diagnostics, recognizing `DiagnosticsError` and `DiagnosticMessage` instances or providing its own `Diagnostic` as needed.
0 commit comments