This commit is contained in:
Janis M
2022-05-02 11:58:32 +02:00
parent fbcc1a7371
commit aa89da7ce9
36 changed files with 1533 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package nogard.schritt6.exceptions;
import nogard.schritt6b.Gegenstand;
public class GegenstandNichtVorhandenException extends Exception {
private final String text;
public GegenstandNichtVorhandenException(Gegenstand g) {
StringBuilder sb = new StringBuilder();
sb.append(g.getInfo());
sb.append("Ist nicht in dem Bereich vorhanden.");
text = sb.toString();
}
public GegenstandNichtVorhandenException(String text) {
this.text = text;
}
@Override
public String getMessage() {
return text;
}
}