ref: refs/heads/master
commit d1d0bf3e56fb467f0f1cd05651d29ec2125b17aa
Author: Josef Reidinger
Date: Tue Jul 14 13:13:13 2009 +0200
proper log problem with finding site for proxy
---
webclient/lib/yast/service_resource.rb | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/webclient/lib/yast/service_resource.rb b/webclient/lib/yast/service_resource.rb
index 00cd35f..eac26d0 100644
--- a/webclient/lib/yast/service_resource.rb
+++ b/webclient/lib/yast/service_resource.rb
@@ -64,8 +64,16 @@ module YaST
def self.proxy_for(interface_name, opts={})
# not used yet
# {:site => ActiveResource::Base::, :arg_two => 'two'}.merge!(opts)
- resource = self.resource_for_interface(interface_name) rescue nil
- return nil if resource.nil?
+ resource = nil
+ begin
+ resource = self.resource_for_interface(interface_name)
+ raise "null resource, should throw inside resource_for_interface" unless resource
+ rescue Exception => e
+ Rails.logger.warn e.message
+ Rails.logger.warn e.backtrace.join("\n")
+ return nil
+ end
+
proxy = self.class_for_resource(resource, opts)
if block_given?
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org