Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Kender suppressing system call errors #20

Open
uchittamuru-mdsol opened this issue Apr 3, 2013 · 1 comment
Open

Kender suppressing system call errors #20

uchittamuru-mdsol opened this issue Apr 3, 2013 · 1 comment

Comments

@uchittamuru-mdsol
Copy link

When system call (bundle exec shamus) execution fails, kender is suppressing the reason behind the failure and just saying Run time error with an error code ( https://github.com/mdsol/kender/blob/master/lib/kender/command.rb#l24), instead it would be quite useful if the reason for the failure is printed out. I looked up on the net and found the following a better way to handle system call errors.

begin
  %x[system_call]
rescue Exception => e
  puts e.message
end
@asmith-mdsol
Copy link
Contributor

That's a really good idea @uchittamuru-mdsol! Something we might also look to do in Ruby 1.9+ is use popen3 or similar so that we can manage both STDOUT and STDERR (if that's actually necessary). If you like to open a PR, please go ahead!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants