We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This Swift switch:
switch exception { case .network(_, _, let serverMessage): if let message = serverMessage { trackError(name: message.status, message: message.message) } else { trackError(name: "network", message: R.string.localizable.network_error()) } case .generic(let error): trackError(name: "generic", message: error) default: trackError(name: "generic", message: R.string.localizable.generic_error()) }
Translates to:
when (exception) { .network -> val message = serverMessage if (message != null) { trackError(name = message.status, message = message.message) } else { trackError(name = "network", message = R.string.localizable.network_error()) } .generic -> trackError(name = "generic", message = error) else -> trackError(name = "generic", message = R.string.localizable.generic_error()) }
But should add {} like:
{}
when (exception) { .network -> { val message = serverMessage if (message != null) { trackError(name = message.status, message = message.message) } else { trackError(name = "network", message = R.string.localizable.network_error()) } } .generic -> trackError(name = "generic", message = error) else -> trackError(name = "generic", message = R.string.localizable.generic_error()) }
The text was updated successfully, but these errors were encountered:
#56 Switch cases with multiple lines not properly indented by {}
817d3e0
Fixed with 817d3e0
Sorry, something went wrong.
No branches or pull requests
This Swift switch:
Translates to:
But should add
{}
like:The text was updated successfully, but these errors were encountered: