Do you see the same issue when working with lazy sequences? We definitely
don't eat exceptions.

On Monday, January 9, 2012, Tassilo Horn <tass...@member.fsf.org> wrote:
> Phil Hagelberg <p...@hagelb.org> writes:
>
> Hi Phil,
>
>>> One thing that really made the programming extremely hard was that I
>>> don't get any backtraces if an exception occurs inside a `run'.  For
>>> example, I get this in SLIME with M-x clojure-jack-in RET.
>>
>>>   (defn wrongo [a b] false)         ;; intentionally broken
>>>   ;=> #'logic-introduction.extend/wrongo
>>>   (run* [q] (wrongo 1 2))
>>>   ; Evaluation aborted.
>>
>> Does the problem only happen with specific exceptions coming from
>> core.logic or is it a general problem?
>
> It seems to be specific to exceptions thrown inside core.logic.  For
> example, all those put me in the SLIME debugger just as it should be:
>
>  (run* [q] (/ 1 0))      => ArithmeticException
>  (run* [q] (wrongo 1))   => ArityException
>
> However, exceptions thrown inside core.logic don't show up.
>
>  (run* [q] (wrongo 1 2))
>  ; Evaluation aborted.
>  (clojure.repl/pst *e)
>  ClassCastException java.lang.Boolean cannot be cast to clojure.lang.IFn
>        clojure.core.logic.Substitutions (logic.clj:207)
>
 de.uni-koblenz.ist.funtg.funrl/eval5744/fn--5745/fn--5746/-inc--5747
(NO_SOURCE_FILE:1)
>        clojure.core.logic/eval2975/fn--2976/fn--2977 (logic.clj:885)
>        clojure.lang.LazySeq.sval (LazySeq.java:42)
>        clojure.lang.LazySeq.seq (LazySeq.java:67)
>        clojure.lang.RT.seq (RT.java:466)
>        clojure.core/seq (core.clj:133)
>        clojure.core/take/fn--3836 (core.clj:2499)
>        clojure.lang.LazySeq.sval (LazySeq.java:42)
>        clojure.lang.LazySeq.seq (LazySeq.java:60)
>        clojure.lang.RT.seq (RT.java:466)
>        clojure.core/seq (core.clj:133)
>  nil
>
>> If you can find the places where clj-stacktrace is used inside
>> swank-clojure and wrap them in try/catches that do .printStackTrace
>> you might be able to discover more about the cause.  Or if it's
>> something specific to using core.logic please provide steps for how to
>> reproduce, preferably in the issue tracker.
>
> I'll do so, but not this evening.  Now that I know of *e and `pst', it
> lost much of its importance, anyway. :-)
>
> Bye,
> Tassilo
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to