diff options
| author | John Wiegley <johnw@newartisans.com> | 2008-09-01 03:46:41 -0400 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2008-09-01 05:05:16 -0400 |
| commit | e02e36b9e62af44091cdf98c1ab4e153b5d55c82 (patch) | |
| tree | 20614434849ff1d753d930d0f3ba041e9340e46e /chess-algebraic.el | |
| parent | 2d588570a4a77246c33d025f8851c6c3ce2202b8 (diff) | |
Report a clearer error in the case of an algebraic queening move with an
unspecified promotion.
Diffstat (limited to 'chess-algebraic.el')
| -rw-r--r-- | chess-algebraic.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chess-algebraic.el b/chess-algebraic.el index 89ca0a6..af2f898 100644 --- a/chess-algebraic.el +++ b/chess-algebraic.el @@ -120,11 +120,17 @@ This regexp handles both long and short form.") (when changes (when trust (if mate - (nconc changes (list (if (equal mate "#") :checkmate :check))))) + (nconc changes (list (if (equal mate "#") + :checkmate + :check))))) (unless long-style (nconc changes (list :san move))) - (apply 'chess-ply-create position trust changes)))))) + (condition-case err + (apply 'chess-ply-create position trust changes) + (error + (error "Error in algebraic move '%s': %s" + move (error-message-string err))))))))) (defun chess-ply--move-text (ply long) (or |
