aboutsummaryrefslogtreecommitdiff
path: root/packages.lisp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-02-15 15:40:56 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-02-15 15:40:56 +0000
commit24b07f9166a3c100121143f0d59d3d5d167a82ad (patch)
treeba6a416cc7bb6f685e0d5632222e49a822928d6c /packages.lisp
parent4ded442dd47babd9f3c0163ffe274f92d0e153a7 (diff)
downloadcantedraw-24b07f9166a3c100121143f0d59d3d5d167a82ad.tar.gz
cantedraw-24b07f9166a3c100121143f0d59d3d5d167a82ad.tar.bz2
cantedraw-24b07f9166a3c100121143f0d59d3d5d167a82ad.zip
Introduce custom errors for player handling
Custom errors for malformed/nonexistent player IDs as well as a player not having a high enough balance for the money requested. This will allow me to encode more information in the errors, for callers to use. I'm generally of the opinion that callers should be checking error conditions before calling these functions, but per Murphy's law it would be nice to have more information in the error message.
Diffstat (limited to 'packages.lisp')
-rw-r--r--packages.lisp2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages.lisp b/packages.lisp
index 574da08..4c371c8 100644
--- a/packages.lisp
+++ b/packages.lisp
@@ -55,6 +55,8 @@
(:export
:player
:players
+ :error-player-nonexistent
+ :error-player-broke
:player-id :player-balance :player-hand
:player-exists? :player-bankrupt? :player-can-bet?
:player-pay