Giovanni-Mattia-Codemo / ingsw2022-AM12

1 stars 0 forks source link

exception, ok but the server can go on or not? #11

Closed ingconti closed 2 years ago

ingconti commented 2 years ago

try{ assistants.add(temp.createAssistant(i)); }catch (Exception e){ System.out.println("failed to add assistant"); }

we catch and print.. but WHERE we print? we catch and?

pls pay attention on this kind of details.

we are available to discuss about.

ValerioCapo commented 2 years ago

the exception is now sent up to the call that caused the method to be called (for now the Game setup()) and, right now, interrupts execution throwing an exception. We re not too sure what could cause this exception to occur though (other than some future oversight while coding), so for now we opted for a complete interruption of the program.

CristianaCalvaresi commented 2 years ago

We fixed this issue by removing the exceptions, since they were completely redundant and had no real use for the type of code we wrote