1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-23 13:57:52 +00:00

change rescue

This commit is contained in:
nishiki 2014-01-29 22:49:13 +01:00
parent 96fe71e07d
commit 1ab3c7e0b0

View file

@ -35,14 +35,12 @@ module MPW
@password = password @password = password
@suffix = suffix @suffix = suffix
begin @socket = TCPSocket.new(host, port)
@socket = TCPSocket.new(host, port) @enable = true
@enable = true rescue Exception => e
rescue Exception => e @error_msg = "#{I18n.t('error.sync.connection')}\n#{e}"
@error_msg = "#{I18n.t('error.sync.connection')}\n#{e}" @enable = false
@enable = false else
end
return @enable return @enable
end end