老师打包下载增加异常捕获

This commit is contained in:
sw 2014-10-11 16:00:37 +08:00
parent 75fb5a2cd3
commit f372b7126a
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ class ZipdownController < ApplicationController
end
send_file zipfile, :filename => obj.name+".zip", :type => detect_content_type(zipfile) if zipfile
#rescue NameError, ActiveRecord::RecordNotFound => e
rescue Exception => e
render file: 'public/no_file_found.html' , :layout => 'course_base'
#logger.error "[ZipDown] ===> #{e}"
#@error = e
end