From 24b07f9166a3c100121143f0d59d3d5d167a82ad Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 15 Feb 2025 15:40:56 +0000 Subject: 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. --- packages.lisp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages.lisp') 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 -- cgit v1.2.3-13-gbd6f