You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/07/23 11:06:00 UTC
[6/6] git commit: Core: Make exception reporting silent on tests
Core: Make exception reporting silent on tests
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/94cfc44e
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/94cfc44e
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/94cfc44e
Branch: refs/heads/master
Commit: 94cfc44e7f288c0b400620e4478e654358a2be97
Parents: 9e87257
Author: Michal Fojtik <mf...@redhat.com>
Authored: Fri Jul 20 15:36:36 2012 +0200
Committer: Michal fojtik <mf...@redhat.com>
Committed: Fri Jul 20 15:36:36 2012 +0200
----------------------------------------------------------------------
server/lib/deltacloud/drivers/exceptions.rb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/94cfc44e/server/lib/deltacloud/drivers/exceptions.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/exceptions.rb b/server/lib/deltacloud/drivers/exceptions.rb
index a89b05f..d5a8bc3 100644
--- a/server/lib/deltacloud/drivers/exceptions.rb
+++ b/server/lib/deltacloud/drivers/exceptions.rb
@@ -177,7 +177,9 @@ module Deltacloud
if exdef.match?($!)
new_exception = exdef.handler($!)
m = new_exception.message.nil? ? $!.message : new_exception.message
- $stderr.send(report_method, "#{[$!.class.to_s, m].join(':')}\n#{$!.backtrace[0..10].join("\n")}")
+ unless ENV['RACK_ENV'] == 'test'
+ $stderr.send(report_method, "#{[$!.class.to_s, m].join(':')}\n#{$!.backtrace[0..10].join("\n")}")
+ end
raise exdef.handler($!) unless new_exception.nil?
end
end