1 package se.citerus.dddsample.domain.model.handling;
2
3 import se.citerus.dddsample.domain.model.cargo.TrackingId;
4
5
6
7
8 public final class UnknownCargoException extends CannotCreateHandlingEventException {
9
10 private final TrackingId trackingId;
11
12
13
14
15 public UnknownCargoException(final TrackingId trackingId) {
16 this.trackingId = trackingId;
17 }
18
19
20
21
22 @Override
23 public String getMessage() {
24 return "No cargo with tracking id " + trackingId.idString() + " exists in the system";
25 }
26 }