8000 Add query to InsufficientParametersException by kennethtiller · Pull Request #418 · jasync-sql/jasync-sql · GitHub
[go: up one dir, main page]

Skip to content

Add query to InsufficientParametersException #418

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

Merged
merged 3 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
more idiomatic kotlin
  • Loading branch information
kenneth-tiller committed Nov 8, 2023
commit 869a80557e4b2fd916e5e21b388dc3f941726bba
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ fun verifyException(
} catch (e: Exception) {
// e.printStackTrace()
Assertions.assertThat(e::class.java).isEqualTo(exType)
if (containedInMessage != null) {
Assertions.assertThat(e.message).contains(containedInMessage)
}
containedInMessage?.let { Assertions.assertThat(e.message).contains(it) }
causeType?.let { Assertions.assertThat(e.cause!!::class.java).isEqualTo(it) }
return e.cause ?: e
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ fun verifyException(
throw Exception("Expected exception was not thrown: ${exType.simpleName}->${causeType?.simpleName}")
} catch (e: Exception) {
Assertions.assertThat(e::class.java).isEqualTo(exType)
if (containedInMessage != null) {
Assertions.assertThat(e.message).contains(containedInMessage)
}
containedInMessage?.let { Assertions.assertThat(e.message).contains(it) }
causeType?.let { Assertions.assertThat(e.cause!!::class.java).isEqualTo(it) }
return e.cause ?: e
}
Expand Down
0