; Add class name to error message

* lisp/emacs-lisp/eieio-core.el (eieio-oref): Add class name to error
  message to ease finding offending code.
This commit is contained in:
Przemysław Wojnowski 2015-04-28 18:13:18 +02:00 committed by Stefan Monnier
parent b0481de73b
commit 7e7fd3010b

View file

@ -730,7 +730,7 @@ Argument FN is the function calling this verifier."
(cl-check-type slot symbol)
(cl-check-type obj (or eieio-object class))
(let* ((class (cond ((symbolp obj)
(error "eieio-oref called on a class!")
(error "eieio-oref called on a class: %s" obj)
(let ((c (eieio--class-v obj)))
(if (eieio--class-p c) (eieio-class-un-autoload obj))
c))