From 5f6cff9e803a50215ed23ac6d1f7fb8881220ba6 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Fri, 23 Aug 2013 14:17:12 +0200 Subject: [PATCH] Exeptions handling when sending accidentaly deleted file --- app/controllers/dmsf_files_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index cd5430b2..cbd5647b 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -49,7 +49,11 @@ class DmsfFilesController < ApplicationController end end check_project(@revision.file) - send_revision + begin + send_revision + rescue MissingFile => e + render_404 + end return end