From 08b64d80d97543d2d2f609b01f0cb78b019ecd02 Mon Sep 17 00:00:00 2001 From: Thomas Barthelemy Date: Thu, 26 Mar 2015 21:45:35 +0000 Subject: [PATCH] Handle exceptions properly; fixes #13 --- app/models/repository/git_remote.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/repository/git_remote.rb b/app/models/repository/git_remote.rb index 8ad3508..b9be9d9 100644 --- a/app/models/repository/git_remote.rb +++ b/app/models/repository/git_remote.rb @@ -165,8 +165,8 @@ class Repository::GitRemote < Repository::Git ssh_known_hosts = ssh_dir + "/known_hosts" begin FileUtils.mkdir_p ssh_dir - rescue e - raise "Unable to create directory #{ssh_dir}: " + "\n\n" + e.to_s + rescue Exception => e + raise "Unable to create directory #{ssh_dir}: " + e.to_s end puts "Adding #{host} to #{ssh_known_hosts}"