From e02e36b9e62af44091cdf98c1ab4e153b5d55c82 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 1 Sep 2008 03:46:41 -0400 Subject: Report a clearer error in the case of an algebraic queening move with an unspecified promotion. --- chess-algebraic.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'chess-algebraic.el') 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 -- cgit v1.2.3