Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong file name for exception in REPL #8023

Closed
ssagaert opened this issue Aug 16, 2014 · 6 comments
Closed

wrong file name for exception in REPL #8023

ssagaert opened this issue Aug 16, 2014 · 6 comments

Comments

@ssagaert
Copy link

in version 0.2 of Julia:

I have the following situation: repl -> file A -> file B

file A is just a script that call functions from file B which is a separate module. Basically A is the "main" program and B is the library where the real functionality is. Now when an error occurs in B then in the shell I get the line number & name from A. That's useless. I want the line number (and full stack trace) from B.

@JeffBezanson
Copy link
Member

I suspect this is due to inlining (#1189), but it would be helpful to post a small, reduced example that exhibits the problem in case we're missing something.

@ssagaert
Copy link
Author

I'll see if I can reproduce it but my code has changed since then a lot so I do not have this bug anymore.

@ssagaert
Copy link
Author

file mod.jl

module mod

export f

function f()
println("running f")
error("dummy error")
end

end

file testError.jl

using mod

f()


when running testError in the repl (of JuliaStudio):

julia> testError
running f
LoadError("/home/steven/Documents/hostDocs/julia_workspace/VMRecommender/src/testError.jl",3,ErrorException("dummy error"))

@tknopp
Copy link
Contributor

tknopp commented Aug 18, 2014

I get

julia> include("D:\\Julia-0.3.0-rc4\\share\\julia\\site\\v0.3\\testError.jl")
running f
ERROR: dummy error
in f at D:\Julia-0.3.0-rc4\share\julia\site\v0.3\mod.jl:7
while loading D:\Julia-0.3.0-rc4\share\julia\site\v0.3\testError.jl, in expression starting on line 3

on 0.3 RC4 at Windows. Please note although 0.2 is the latest "official" release I have doubts that this will be fixed in the 0.2 branch. So it would be great if you could switch to 0.3 RC4 and have a look if this or similar errors can be reproduced in that version.

@ssagaert
Copy link
Author

I upgraded to 0.3.0-RC4 on Ubuntu 14.04 and now it works ok.

@ivarne
Copy link
Member

ivarne commented Aug 18, 2014

OK, then I'll mark this issue as Fixed.

@ivarne ivarne closed this as completed Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants