timols / java-gitlab-api

A wrapper for the Gitlab API written in Java
Apache License 2.0
387 stars 317 forks source link

gh-275: Propagate exceptions as a RuntimeException instead of java.lang.Error #281

Closed mjpitz closed 6 years ago

mjpitz commented 6 years ago

This should make it so that consumers can catch an Exception instead of any Error type.

timols commented 6 years ago

Easy. I thought you were going to create a new exception class. This works too :)

islandsvinur commented 5 years ago

Got hit by an Error today (was still on 4.0.0), upgraded to 4.1.0, then got hit again by a generic RuntimeException. Glad it no longer kills my thread, but I would prefer the API to throw IOException as declared. Maybe wrap it here in UncheckedIOException, then unwrap and rethrow?

@timols I'll create an issue