changed instantiation of the class Error to IllegalArgumentException

This commit is contained in:
Quentin Legot 2021-02-11 19:09:07 +01:00
parent d9078685d5
commit 5d2a9d7716

View File

@ -115,7 +115,7 @@ public class MainFrame extends JFrame implements ActionListener{
case 1:
list.setText("Règles : \n");
default:
throw new Error("Wrong argument given to method changeList");
throw new IllegalArgumentException("Wrong argument given to method changeList");
}
}else{
list.append("-> "+stringToAdd + "\n");