Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <web-client> use-activeresource : allow correct backend error report
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 17 Sep 2009 11:13:44 +0200
  • Message-id: <E1MoJ2g-0003Ui-T5@xxxxxxxxxxxxxxxx>
ref: refs/heads/use-activeresource
commit 2f9fef7d76652b6203b48b1b04bd758e02f31ac5
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Sep 17 11:13:32 2009 +0200

allow correct backend error report
---
.../app/controllers/application_controller.rb | 2 +-
webclient/lib/proxy_loader.rb | 10 ----------
webclient/lib/yast/service_resource.rb | 9 +++------
3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/webclient/app/controllers/application_controller.rb
b/webclient/app/controllers/application_controller.rb
index 3c2b0ef..6cf0101 100644
--- a/webclient/app/controllers/application_controller.rb
+++ b/webclient/app/controllers/application_controller.rb
@@ -57,7 +57,7 @@ class ApplicationController < ActionController::Base

def exception_trap(e)
logger.error "***" + e.to_s
-
+
# get the vendor settings
begin
settings_url =
YaST::ServiceResource::Session.site.merge("/vendor_settings/bugzilla_url.json")
diff --git a/webclient/lib/proxy_loader.rb b/webclient/lib/proxy_loader.rb
index f6a95c6..e39dd97 100644
--- a/webclient/lib/proxy_loader.rb
+++ b/webclient/lib/proxy_loader.rb
@@ -44,13 +44,7 @@ module ProxyLoader
return nil
end

- begin
@permissions = proxy.permissions
- rescue Exception => e
- Rails.logger.warn e
- redirect_to "/bad_permissions"
- return nil
- end

ret = nil
begin
@@ -63,10 +57,6 @@ module ProxyLoader
flash[:error] = YaST::ServiceResource.error(e)
Rails.logger.warn e
redirect_to root_path
- rescue Exception => e
- flash[:error] = e.message
- Rails.logger.warn e
- redirect_to root_path
end

return ret
diff --git a/webclient/lib/yast/service_resource.rb
b/webclient/lib/yast/service_resource.rb
index 8a1fa31..f8ad834 100644
--- a/webclient/lib/yast/service_resource.rb
+++ b/webclient/lib/yast/service_resource.rb
@@ -158,12 +158,9 @@ module YaST
perm_resource = OpenStruct.new(:href => '/permissions', :singular =>
false, :interface => 'org.opensuse.yast.webservice.permissions')
proxy = YaST::ServiceResource.class_for_resource(perm_resource)

- begin
- permissions = proxy.find(:all, :params =>
- { :user_id => login, :filter => policy_name })
- rescue
- raise "Cannot find permission for user #{login} and policy
#{policy_name}"
- end
+ permissions = proxy.find(:all, :params =>
+ { :user_id => login, :filter => policy_name })
+
RAILS_DEFAULT_LOGGER.warn "#{proxy.element_name} #{proxy.site}"
ret = Hash.new
permissions.each do |perm|
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages