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

Обработка исключений #32

Open
scrinoman opened this issue Dec 1, 2020 · 0 comments
Open

Обработка исключений #32

scrinoman opened this issue Dec 1, 2020 · 0 comments

Comments

@scrinoman
Copy link

Нужно как-то придумать реализацию или убрать из строгих правил кейс, когда ловятся все исключения и обрабатываются, не проглатываясь
http://wiki.omega-r.club/dev-android-code#rec226454364

@SuppressLint("OMEGA_NOT_IGNORE_EXCEPTIONS")
    override suspend fun addNewPlace(accountNumber: String, name: String) {
        try {
            val place = remoteDataSource.createPlace(accountNumber, name)
            localDataSource.createPlace(place)
        } catch (ex: SQLiteConstraintException) {
            throw DoorphonesException.NameExists
        } catch (ex: Exception) {
            errorHandler.handleThrowable(ex)
        }
    }
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

No branches or pull requests

1 participant