Skip to content

Commit

Permalink
Added error message when trying to sell more than owned
Browse files Browse the repository at this point in the history
  • Loading branch information
elisab3 committed May 26, 2026
1 parent fd44f92 commit ead1d98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/View/MainGameScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ protected void updateItem(Share s, boolean empty) {
}
} catch (NumberFormatException ex) {
alert("Error", "Enter a valid number for quantity");
} catch (IllegalArgumentException ex) {
alert("Error", ex.getMessage());
}
});

Expand Down

0 comments on commit ead1d98

Please sign in to comment.