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

Running rbx bad-filename gives un-rescuable error #568

Closed
rocky opened this issue Nov 15, 2010 · 3 comments
Closed

Running rbx bad-filename gives un-rescuable error #568

rocky opened this issue Nov 15, 2010 · 3 comments

Comments

@rocky
Copy link

rocky commented Nov 15, 2010

When I run:

begin 
  output = `ruby -c fdasfdsasda 2>&1`
rescue
  puts "Got a rescue"
end
if $?.exitstatus != 0 
  puts output
  exit $?.exitstatus 
end

I get an exception traceback. Furthermore it doesn't seem that is handled by the rescue. In MRI 1.8.7 and 1.9.x one doesn't get an exception raised. Instead $? is set which is what I'd expect in Rubinius.

@evanphx
Copy link
Member

evanphx commented Nov 15, 2010

There is no exception raised in either MRI nor rbx because the error occurs in a sub-proces only. Rubinius differs in that it shows Errno::ENOENT instead of LoadError and it displays a backtrace, but otherwise it's the same.

@evanphx
Copy link
Member

evanphx commented Nov 15, 2010

Show the missing file error to -c more clearly. Closed by 21b537b

@rocky
Copy link
Author

rocky commented Nov 15, 2010

Sorry for the noise. A problem in my rvm setup wasn't showing $? properly and hence I didn't realize that $?.exitstatus was set.

This issue was closed.
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

2 participants