Skip to content

Commit

Permalink
exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 18, 2014
1 parent 30bfe06 commit 36409ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/registration/scc_helpers.rb
Expand Up @@ -43,7 +43,7 @@ def self.catch_registration_errors(&block)
begin
yield
true
rescue SccApi::NoNetworkError
rescue SocketError
# Error popup
if Yast::Mode.installation && Yast::Popup.YesNo(
_("Network is not configured, the registration server cannot be reached.\n" +
Expand All @@ -64,7 +64,7 @@ def self.catch_registration_errors(&block)
message = JSON.parse(e.message)["localized_error"] || _("Unknown error")
Yast::Report.Error(message)
false
rescue SccApi::HttpError => e
rescue SUSE::Connect::ApiError => e
case e.response
when Net::HTTPClientError
Yast::Report.Error(_("Registration client error."))
Expand Down

0 comments on commit 36409ea

Please sign in to comment.