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

Create custom exceptions for each use case #11

Open
behzodhalil opened this issue Jun 9, 2023 · 1 comment
Open

Create custom exceptions for each use case #11

behzodhalil opened this issue Jun 9, 2023 · 1 comment
Assignees
Labels
feature New feature hacktoberfest For contributions

Comments

@behzodhalil
Copy link
Member

behzodhalil commented Jun 9, 2023

Description

  • Custom exceptions is useful for error handling. It helps to indicate specific errors.
@behzodhalil behzodhalil added the feature New feature label Jun 9, 2023
@behzodhalil behzodhalil self-assigned this Jun 9, 2023
@behzodhalil
Copy link
Member Author

behzodhalil commented Jun 9, 2023

Use cases:

  1. If the state is not initialized, it can be beneficial to create a custom exception called NotInitializedException. This exception represents a scenario where an object or component has not been properly initialized, and it is thrown to indicate that the required initialization has not occurred. For example:
class NotInitializedException(message: String) : RuntimeException(message = message)
  1. Coroutine exception. Meteor based on Coroutine / Flow APIs.

@behzodhalil behzodhalil added the hacktoberfest For contributions label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature hacktoberfest For contributions
Projects
None yet
Development

No branches or pull requests

1 participant