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

course_group
sw 11 years ago
parent 75fb5a2cd3
commit f372b7126a

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

Loading…
Cancel
Save