Christophe Lorenz:

try {
  santa.requestPresents(Kids.getList());
} catch(NoBelieveInSantaException e) {
  return null; /* ouch */
}

try {
  parents.buyPresentsFrom(EMailRecovery.recoveEmailSentTo("Santa"));
} catch(NotEnoughMoneyException e) {
  return null; /* ouch */
}

while(!kids.areSleeping());

try {
  parents.assemblePresents(FreeTime.NIGHT_TIME);
} catch(AssemblyGuideNotFoundException e) {
  return null; /* ouch */
}

parents.sleep(Parents.NIGHT_TIME);

try {
  kids.showSurprise();
} catch(UnexpectedPresentDissapointmentException e) {
  return null; /* ouch */
}

Aucun commentaire: