Skip to content

Conversation

@daolq3012
Copy link
Owner

No description provided.

private fun handleEvents() {
mView.nextView.setOnClickListener { onNextClick() }
mView.nextView.setOnClickListener {
throw RuntimeException("Test Crash") // Force a crash
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ RuntimeException is a too generic Exception. Prefer throwing specific exceptions that indicate a specific error case.

private fun handleEvents() {
mView.nextView.setOnClickListener { onNextClick() }
mView.nextView.setOnClickListener {
throw RuntimeException("Test Crash") // Force a crash
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This expression is followed by unreachable code which should either be used or removed.

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.

2 participants