From dave at wegoto12.com Sat Apr 12 16:01:34 2008
From: dave at wegoto12.com (David Grandinetti)
Date: Sat, 12 Apr 2008 16:01:34 -0400
Subject: [Ruby-aws-develop] patch to help with better error reporting
Message-ID: <2888FCE1-3474-4583-AE8A-DD0405873EC4@wegoto12.com>
e.g. - Feature #16555
http://rubyforge.org/tracker/index.php?func=detail&aid=16555&group_id=4009&atid=15487
I was having specific problems figuring out the specific error I had
during createHITs. Turned out I was using :NumAssignments instead
of :MaxAssignments.
This adds the description to the error message...so you know which
specific argument is out of range instead of just getting the
"Parameter out of range" type message.
Here is the code I use to print out the results. PP is "pretty print"
to see the hash all pretty like.
require 'pp'
...
hits = @mturk.createHITs(hit_template,question,hit_data_set)
pp hits
The output will look like this (term is a parameter in our ERB
template)...
{:Created=>[],
:Failed=>
[{:Description=>
"The value you specified for MaxAssignments is invalid. Valid
values range from 1 to 1000000000.",
:term=>"dolphin",
:Error=>"AWS.ParameterOutOfRange"},
{:Description=>
"The value you specified for MaxAssignments is invalid. Valid
values range from 1 to 1000000000.",
:term=>"republican",
:Error=>"AWS.ParameterOutOfRange"}]}
Thought you might like this...it was helpful for us.
Also, ping. Is this an active project these days?
-dave
David Grandinetti
We Go To 12
+1 315.569.2594
dave at wegoto12.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: betterValidationReporting.patch
Type: application/octet-stream
Size: 581 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/ruby-aws-develop/attachments/20080412/426ff785/attachment-0001.obj
-------------- next part --------------
From james at howison.name Thu Apr 24 17:03:11 2008
From: james at howison.name (James Howison)
Date: Thu, 24 Apr 2008 17:03:11 -0400
Subject: [Ruby-aws-develop] error reporting patch?
Message-ID:
Will this patch be applied to the ruby-aws svn?
http://rubyforge.org/pipermail/ruby-aws-develop/2008-April/000119.html
Why is it so quiet around here? I'd have imagined there were many
people using Ruby, Ruby on Rails and Mechanical Turk, is that not the
case?
--J