search for: remotecontainerexcept

Displaying 1 result from an estimated 1 matches for "remotecontainerexcept".

2011 May 22
6
How to capture correctly a specific exception
...equest_id) def perform .... > connector = RemoteContainerServer::Connector.create!(remote_container) > raise Exceptions::RemoteLockerDenied , "RemoteLockerDenied" if connector.nil? .... > requestId = connector.request_job(user, remote_container) > raise Exceptions::RemoteContainerException, "RemoteContainerException" if requestId.nil? ... end there is a hook for any exception raised, to trap ALL the errors and do something according to the raised exception , i.e. : def error(job, exception) case exception when "RemoteContainerDenied"...