summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobin Edwards <robin.ge@gmail.com>2010-11-09 09:49:09 +0000
committerRobin Edwards <robin.ge@gmail.com>2010-11-09 09:49:09 +0000
commit32d55cf4650883bdbcdeab32382c686ad0f15837 (patch)
treee2127b3e7114d3155bf8c5d6f2d3e9b75d377fd6
parentadded delete_object method (diff)
downloadnet-riak-32d55cf4650883bdbcdeab32382c686ad0f15837.tar.gz
added expected status message
Diffstat (limited to '')
-rw-r--r--lib/Net/Riak/Object.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Net/Riak/Object.pm b/lib/Net/Riak/Object.pm
index 25275c5..714776c 100644
--- a/lib/Net/Riak/Object.pm
+++ b/lib/Net/Riak/Object.pm
@@ -143,9 +143,10 @@ sub populate {
     $self->data($http_response->content);
 
     if (!grep { $status == $_ } @$expected) {
-        croak "Expected status "
+        confess "Expected status "
           . (join(', ', @$expected))
-          . ", received $status";
+          . ", received: \n"
+          . $http_response->as_string; 
     }
 
     if ($status == 404) {