deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [12/12] git commit: Core: Add custom message option for report_error()
Date Fri, 22 Feb 2013 10:32:24 GMT
Updated Branches:
  refs/heads/master 54a86113e -> bb6aed453


Core: Add custom message option for report_error()


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/78c26379
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/78c26379
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/78c26379

Branch: refs/heads/master
Commit: 78c26379ee4dbd86818261ec1184f7937b6ba24e
Parents: 7a801a3
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Feb 11 12:27:28 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Feb 22 11:32:02 2013 +0100

----------------------------------------------------------------------
 server/lib/deltacloud/helpers/deltacloud_helper.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/78c26379/server/lib/deltacloud/helpers/deltacloud_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index bb023af..fa8515a 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -102,10 +102,10 @@ module Deltacloud::Helpers
       Deltacloud::Exceptions.logger(Deltacloud.default_frontend.logger)
     end
 
-    def report_error(code=nil)
+    def report_error(code=nil, message=nil)
 
       if !code.nil?
-        @error = Deltacloud::Exceptions.exception_from_status(code, translate_error_code(code)[:message])
+        @error = Deltacloud::Exceptions.exception_from_status(code, message || translate_error_code(code)[:message])
         @code = code
         message = @error.message
       else


Mime
View raw message