diff options
author | Stas Boukarev <stassats@gmail.com> | 2024-09-27 12:20:57 +0300 |
---|---|---|
committer | Stas Boukarev <stassats@gmail.com> | 2024-09-29 23:11:51 +0300 |
commit | a2586b5d3daa12a0d51e7ebe55d0fb5ff71c4572 (patch) | |
tree | 91804338d1541736fe82c54986af420888c1df19 | |
parent | bf5687489fca073e96ef4c070a935e5224c23846 (diff) |
Better type error for FORMAT.
Say it wants (or string function) instead of a (or simple-string
string function) etypecase error.
-rw-r--r-- | src/code/target-format.lisp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/code/target-format.lisp b/src/code/target-format.lisp index fa1b7486a..dc53d15ab 100644 --- a/src/code/target-format.lisp +++ b/src/code/target-format.lisp @@ -117,15 +117,15 @@ (truly-the (values t &optional) (catch 'up-and-out - (let* ((string (etypecase string-or-fun + (let* ((string (typecase string-or-fun (simple-string string-or-fun) (string (coerce string-or-fun 'simple-string)) - ;; Not just more compact than testing for fmt-control - ;; but also produces a better error message. (function - (fmt-control-string string-or-fun)))) + (fmt-control-string string-or-fun)) + (t + #.(sb-c::internal-type-error-call 'string-or-fun '(or string function))))) (*default-format-error-control-string* string) (*logical-block-popper* nil) (tokens |