1 package se.citerus.dddsample.domain.model.handling;
2
3 import se.citerus.dddsample.domain.model.location.UnLocode;
4
5 public class UnknownLocationException extends CannotCreateHandlingEventException {
6
7 private final UnLocode unlocode;
8
9 public UnknownLocationException(final UnLocode unlocode) {
10 this.unlocode = unlocode;
11 }
12
13 @Override
14 public String getMessage() {
15 return "No location with UN locode " + unlocode.idString() + " exists in the system";
16 }
17 }