Imagine you have a method like:
public void doGreatThings() throws CantDoGreatThingsException, RuntimeException {...}
Is there any way to programmatically get the declared thrown exceptions by way of reflection?
// It might return something like Exception[] thrownExceptions = [CantDoGreatThingsException.class, RuntimeException.class]
Aucun commentaire:
Enregistrer un commentaire