Is there a way to know if the output from quick-check was the result of a generator throwing an exception versus the function throwing an exception?
I don't think generator exceptions get caught
Ah. I'm calling via spec's check
which does not throw in that case which explains the weird looking output.
Does it catch exceptions?
It appears so. When a gen throws, it attaches the generator exception on the :result
key and nothing else.
Is it calling the generator manually?
Or it just catches everything?
Hmm actually that's not even a generator throwing. It's a gen throwing while being constructed.
Yeah
Bad test case. Will see what happens when a gen actually throws.
I don't like that return value
Agreed
I'm checking for it like this haha
(and (instance? Throwable (:result ret))
(nil? (:shrunk ret)))
Uckh
Same thing when the gen throws
Different part of the code returns the same thing?
Yep
I don't think there's any way for me to differentiate an exception from a generator throwing while construction and a generator throwing while generating.
Except the stack trace 😉
Yeah... Not sure where it's catching the gen throwing case.
It's not in that ns. Must be doing it elsewhere.