Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix superfluous try/catch causing build warning #187

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

tristanlabelle
Copy link
Contributor

Causes:

[107/751] Building Swift Module 'WindowsFoundation' with 50 sources
C:\Code\arc\build\debug\generated\Frameworks\WinRT\Sources\WindowsFoundation\Support\error.swift:184:9: warning: no calls to throwing functions occur within 'try' expression
182 |
183 |     do {
184 |         try message.withHStringRef {
    |         `- warning: no calls to throwing functions occur within 'try' expression
185 |             _ = RoOriginateLanguageException(hresult, $0, nil)
186 |         }

C:\Code\arc\build\debug\generated\Frameworks\WinRT\Sources\WindowsFoundation\Support\error.swift:187:7: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
185 |             _ = RoOriginateLanguageException(hresult, $0, nil)
186 |         }
187 |     } catch {
    |       `- warning: 'catch' block is unreachable because no errors are thrown in 'do' block
188 |         _ = RoOriginateLanguageException(hresult, nil, nil)
189 |     }

@tristanlabelle tristanlabelle requested a review from a team as a code owner October 22, 2024 21:12
@tristanlabelle tristanlabelle requested a review from a team October 22, 2024 21:12
@tristanlabelle tristanlabelle merged commit 6891933 into main Oct 22, 2024
1 check passed
@tristanlabelle tristanlabelle deleted the tristan/fix-extra-try-catch branch October 22, 2024 21:17
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.

3 participants