如何在Clojure堆栈跟踪中查看函数参数?

时间:2017-05-06 02:14:51

标签: debugging clojure stack-trace

如何在Clojure堆栈跟踪中看到传递给函数的参数?

例如,如何在此堆栈跟踪中查看传递给*get-item*normalize-item-refoutvalue-ofhappinessnodestr的参数?很高兴看到程序如何得到错误而不仅仅是错误。

ERROR in (this-test) (workspace.clj:330)
Uncaught exception, not in assertion.
expected: nil
  actual: java.lang.AssertionError: Assert failed: (item-or-item-ref? item-or-item-ref)
 at fargish.workspace$_STAR_get_item.invokeStatic (workspace.clj:330)
    fargish.workspace$_STAR_get_item.invoke (workspace.clj:330)
    fargish.workspace$_STAR_normalize_item_ref.invokeStatic (workspace.clj:365)
    fargish.workspace$_STAR_normalize_item_ref.invoke (workspace.clj:360)
    fargish.workspace$outvalue_of.invokeStatic (workspace.clj:815)
    fargish.workspace$outvalue_of.invoke (workspace.clj:810)
    fargish.workspace$outvalue_of.invokeStatic (workspace.clj:812)
    fargish.workspace$outvalue_of.invoke (workspace.clj:810)
    fargish.workspace$happiness.invokeStatic (workspace.clj:904)
    fargish.workspace$happiness.invoke (workspace.clj:902)
    fargish.workspace$nodestr.invokeStatic (workspace.clj:1039)
    fargish.workspace$nodestr.invoke (workspace.clj:1035)
    . . .

1 个答案:

答案 0 :(得分:3)

堆栈跟踪中不存在该信息。