On Mon, 1 Nov 2021 at 09:51, Alonso Del Arte <alonso.dela...@gmail.com>
wrote:

> >  Although I do it often enough, I'm not a fan of wrapping a checked
> exception in a RuntimeException or even another checked exception like
> IOException.
>
> I'm not either. Nor do I like how AssertionError has a constructor that
> takes an Object rather than specifically a Throwable. But usually (though
> not always), a better way occurs to me during refactoring. I'm not sure I
> see the benefit of managed exceptions.
>

Might it be good to have a way to indicate to others that your module can
guarantee that checked exceptions have not been buried inside unchecked
ones?

I'm wondering if perhaps it might be good to generate a compile error in
code that threw anything other than the type of managed exception that was
indicated to be thrown in an associated module descriptor?

  Owen.

Reply via email to