Class: ERROR-COMPONENT

Documentation

Generic component for showing server side error conditions. Unlike ERROR-MESSAGE this component also attempts to display a backtrace.

Slots

  • CONDITION
  • BACKTRACE

Hierachy

Precedence List

Source

(defclass error-component (error-message)
  ((condition :accessor error.condition :initarg :condition :initform nil)
   (backtrace :accessor error.backtrace :initarg :backtrace))
  (:documentation "Generic component for showing server side
 error conditions. Unlike ERROR-MESSAGE this component also
 attempts to display a backtrace.")
  (:default-initargs
    :place (make-place (context.window-component *context*))
    :inline-javascript (js:js
                        (defun toggle-display (id)
                          (let ((element (document.get-element-by-id id)))
                            (with-slots (display) (slot-value element 'style)
                              (setf display (if (= display "none")
                                                "block"
                                                "none")))))))
  (:metaclass standard-component-class))
Source Context