bonsoir, je voulais savoir la différence entre @throws et @exception quand on génère JavaDoc. J'ai constaté que @throws s'insère automatiquement quand la fonction commentée throws une exception. et j'ai utilisé @exception pour indique une exception du runtime.
Exemple
/**
*........
*@throws InterruptedException
* si une interruption pendant l'attente
* @exception NullPointerException
* si le message est null
*.....
*/
public final void envoyerAttente(Message msg) throws InterruptedException {
.....}
quand on gènére le JavaDoc il m'affiche
Throws:
InterruptedException si une interruption pendant l'attente
NullPointerException si le message est null
Quelqu'un peut m'expliquer quand on utilise @throws et @exception? est ce que je les ai utilisé correctement? et où je trouve une bonne documentation sur JavaDoc afin de terminer JavaDoc de mon application?
merci
Partager