Skip to content

Commit

Permalink
Merge pull request #46 from solvena/43-add-error-message-when-trying-…
Browse files Browse the repository at this point in the history
…to-sell-more-than-owned

Added error message when trying to sell more shares than owned
  • Loading branch information
solvena authored May 26, 2026
2 parents fd44f92 + ead1d98 commit b027d86
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 b027d86

Please sign in to comment.