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

Convey remote backtrace if available in workitem #8

Merged
merged 1 commit into from Mar 17, 2013

Conversation

iamer
Copy link
Contributor

@iamer iamer commented Mar 17, 2013

Depends on
jmettraux/ruote@b7eeff0

If the remote participant has set a trace in the workitem, add it to the error.

@jmettraux
Copy link
Collaborator

Hello,

thanks for the request.

This code will fail if err is not a hash...

OK, let me pull it in and add a test and fix it.

@iamer
Copy link
Contributor Author

iamer commented Mar 17, 2013

I did that similar to https://github.com/kennethkalmer/ruote-amqp/blob/master/lib/ruote/amqp/receiver.rb#L148 , wouldn't make sense to have a trace in h without an error.

It might be originally done like that so as not to reuse the error in case workitem gets resent (expression is reapplied for example ).

@jmettraux
Copy link
Collaborator

if there is no h['trace'] and err is a not a Hash then your code will raise on err['trace'].

Correction "string"['trace'] will not raise though....

1.9.3p194 :001 > "string"['trace']
 => nil
1.9.3p194 :002 >

jmettraux added a commit that referenced this pull request Mar 17, 2013
Convey remote backtrace if available in workitem
@jmettraux jmettraux merged commit 04757ef into kennethkalmer:master Mar 17, 2013
@jmettraux
Copy link
Collaborator

ok, the pull request breaks the specs.

**err**
#<TypeError: can't convert String into Integer>
/Users/jmettraux/w/ruote-amqp/lib/ruote/amqp/receiver.rb:159:in `[]'
...

fixing...

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

Successfully merging this pull request may close these issues.

None yet

2 participants