Mailinglist Archive: yast-commit (883 mails)
| < Previous | Next > |
[yast-commit] <web-client> master : proper log problem with finding site for proxy
- From: Josef Reidinger <jreidinger@xxxxxxx>
- Date: Tue, 14 Jul 2009 13:13:32 +0200
- Message-id: <E1MQfx6-00080R-1L@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit d1d0bf3e56fb467f0f1cd05651d29ec2125b17aa
Author: Josef Reidinger <jreidinger@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
commit d1d0bf3e56fb467f0f1cd05651d29ec2125b17aa
Author: Josef Reidinger <jreidinger@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |