prefer catching RuntimeError
parent
6977a12dd8
commit
dfd00ad50b
|
@ -156,7 +156,7 @@ class Webcam
|
||||||
begin
|
begin
|
||||||
write_file("#{tmp_dir}\\interface.html", interface)
|
write_file("#{tmp_dir}\\interface.html", interface)
|
||||||
write_file("#{tmp_dir}\\api.js", api)
|
write_file("#{tmp_dir}\\api.js", api)
|
||||||
rescue ::Exception => e
|
rescue RuntimeError => e
|
||||||
elog("webcam_chat failed. #{e.class} #{e}")
|
elog("webcam_chat failed. #{e.class} #{e}")
|
||||||
raise "Unable to initialize the interface on the target machine"
|
raise "Unable to initialize the interface on the target machine"
|
||||||
end
|
end
|
||||||
|
@ -174,7 +174,7 @@ class Webcam
|
||||||
setting = %|user_pref("media.navigator.permission.disabled", true);|
|
setting = %|user_pref("media.navigator.permission.disabled", true);|
|
||||||
begin
|
begin
|
||||||
write_file(profile_path, setting)
|
write_file(profile_path, setting)
|
||||||
rescue ::Exception => e
|
rescue RuntimeError => e
|
||||||
elog("webcam_chat failed: #{e.class} #{e}")
|
elog("webcam_chat failed: #{e.class} #{e}")
|
||||||
raise "Unable to write the necessary setting for Firefox."
|
raise "Unable to write the necessary setting for Firefox."
|
||||||
end
|
end
|
||||||
|
@ -185,7 +185,7 @@ class Webcam
|
||||||
|
|
||||||
begin
|
begin
|
||||||
session.sys.process.execute(remote_browser_path, "#{args} #{tmp_dir}\\interface.html", exec_opts)
|
session.sys.process.execute(remote_browser_path, "#{args} #{tmp_dir}\\interface.html", exec_opts)
|
||||||
rescue ::Exception => e
|
rescue RuntimeError => e
|
||||||
elog("webcam_chat failed. #{e.class} #{e}")
|
elog("webcam_chat failed. #{e.class} #{e}")
|
||||||
raise "Unable to start the remote browser: #{e.message}"
|
raise "Unable to start the remote browser: #{e.message}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue