Übung 07 · Defizit D8

Exception mit Message + this

Aufgabe · 2 P
Implementiere wie beschrieben
Wirf in enter(Attendee a) eine NotAllowedException mit String-Nachricht und this als zweites Argument.
  • Falsch: throw new NotAllowedException(getMessage())
  • Richtig: throw new NotAllowedException("Raum ist voll", this)

← Vorherige Übersicht Nächste →