prefer catching RuntimeError

bug/bundler_fix
Brent Cook 2015-08-24 16:42:33 -05:00
parent 6977a12dd8
commit dfd00ad50b
1 changed files with 3 additions and 3 deletions

View File

@ -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