Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add try/catch to Jdbi#withHandle inside Mockito#when in Jdbi3HelpersT…
…est (#462) Add a try/catch inside the FindDatabasePlugin#whenWithHandleCalled method to make VSCode (I guess really the Red Hat Java extension) happy. For some reason, it always complains that about "Unhandled exception type Exception Java(16777384)". It apparently "thinks" the exception thrown by the Jdbi#withHandle method, which is called inside the Mockito#when method, must be handled. Neither Maven nor IntelliJ have any problems with the code, and they compile it and run it just fine. But whenever I need to pop into Gitpod and do something, this code is flagged by VSCode/Red Hat Java Extension. So, the easiest thing to do is just appease it and add a try/catch around that code. If an exception is thrown, wrap with a RuntimeException.
- Loading branch information