I see, thanks for a quick reply.
W dniu niedziela, 20 grudnia 2015 23:25:47 UTC+1 użytkownik Stefan Karpinski napisał: > > This is unfortunately one of the costs of being fast. It's hard to be fast > and have good stack traces at the same time. > > On Sun, Dec 20, 2015 at 5:18 PM, Marcin Elantkowski < > [email protected] <javascript:>> wrote: > >> Hello, >> >> is it possible to view a full traceback that caused an error in Julia? >> >> E.G. >> julia> function f() >> # lots of lines >> a = zeros(5) >> b = a[8] # oops >> # lots of lines >> end >> f (generic function with 1 method) >> julia> g() = f() >> g (generic function with 1 method) >> julia> g() >> ERROR: BoundsError: attempt to access 5-element Array{Float64,1}: >> 0.0 >> 0.0 >> 0.0 >> 0.0 >> 0.0 >> at index [8] >> in g at none:1 >> >> Which doesn't help me at all, since I have one Array that is used by many >> functions, all of which are called inside my g() >> Is it somehow possible to find out which particular function caused an >> error? >> >> In Python I have: >> >>> g() >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "<stdin>", line 1, in g >> File "<stdin>", line 3, in f >> IndexError: index 8 is out of bounds for axis 0 with size 5 >> >> >> >
