Skip to content

Commit

Permalink
fix catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
QAutomatron committed Jul 7, 2020
1 parent 88b4a57 commit 70a27ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'digital.wup.android-maven-publish' version '3.6.3'
}

version = "0.6.5"
version = "0.6.6"

android {
compileSdkVersion 29
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,10 @@ class ViewMatcherWaiter constructor(val viewMatcher: Matcher<View>, val inRoot:
return try {
onView(viewMatcher).inRoot(inRoot).check(matches(viewChecker))
true
} catch (e: Exception) {
when(e) {
is AssertionError, is NoMatchingViewException -> {
return false
}
else -> throw e
}
} catch (e: AssertionError) {
false
} catch (e: NoMatchingViewException) {
false
}
}
})
Expand All @@ -70,13 +67,10 @@ class ViewMatcherWaiter constructor(val viewMatcher: Matcher<View>, val inRoot:
return try {
onView(viewMatcher).inRoot(inRoot).check(viewAssertion)
true
} catch (e: Exception) {
when(e) {
is AssertionError, is NoMatchingViewException -> {
return false
}
else -> throw e
}
} catch (e: AssertionError) {
false
} catch (e: NoMatchingViewException) {
false
}
}
})
Expand Down

0 comments on commit 70a27ed

Please sign in to comment.