Commandes et bouchon Expressions

This commit is contained in:
SylvanCourtiol
2021-05-08 11:54:22 +02:00
parent f0b66cf656
commit a0c972a41d
18 changed files with 860 additions and 7 deletions
@@ -0,0 +1,40 @@
/**
* EssaiInterpreteurException.java 7 mai 2021
* IUT Rodez info1 2020-2021, pas de copyright, aucun droit
*/
package interpreteurlir.tests;
import interpreteurlir.InterpreteurException;
/**
* Essai des {@link InterpreteurException}
* @author Nicolas Caminade
* @author Sylvan Courtiol
* @author Pierre Debas
* @author Heïa Dexter
* @author Lucas Vabre
*/
public class EssaiInterpreteurException {
/**
* Lancement des essais.
* @param args non utilisé
*/
public static void main(String[] args) {
String[] messages = {
null,
"",
"la commande fin n'accepte pas d'arguments"
};
for (String msg : messages) {
System.out.print("Message de l'exception : ");
try {
throw new InterpreteurException(msg);
} catch (InterpreteurException lancee) {
System.out.println(lancee.getMessage());
}
}
}
}