Skip to content
Browse files

Let people access the raw exec message

  • Loading branch information...
1 parent b42547a commit 39e53f8fb4be7effde4607965786e86b584ab80a @gdb committed Jan 9, 2014
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/rubysh/error.rb
  2. +1 −1 lib/rubysh/subprocess.rb
View
5 lib/rubysh/error.rb
@@ -4,10 +4,11 @@ class BaseError < Exception; end
class ExecError < BaseError
# Exception klass and caller from the child process
- attr_accessor :klass, :caller
+ attr_accessor :raw_message, :klass, :caller
- def initialize(message, klass, caller)
+ def initialize(message, raw_message, klass, caller)
super(message)
+ @raw_message = raw_message
@klass = klass
@caller = caller
end
View
2 lib/rubysh/subprocess.rb
@@ -146,7 +146,7 @@ def handle_exec_error
when false
# success!
when Hash
- @exec_error = Rubysh::Error::ExecError.new("Failed to exec in subprocess: #{msg['message']}", msg['klass'], msg['caller'])
+ @exec_error = Rubysh::Error::ExecError.new("Failed to exec in subprocess: #{msg['message']}", msg['message'], msg['klass'], msg['caller'])
else
@exec_error = Rubysh::Error::BaseError.new("Invalid message received over the exec_status pipe: #{msg.inspect}")
end

0 comments on commit 39e53f8

Please sign in to comment.
Something went wrong with that request. Please try again.