老师打包下载增加异常捕获
This commit is contained in:
parent
75fb5a2cd3
commit
f372b7126a
|
@ -31,7 +31,8 @@ class ZipdownController < ApplicationController
|
||||||
end
|
end
|
||||||
send_file zipfile, :filename => obj.name+".zip", :type => detect_content_type(zipfile) if zipfile
|
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}"
|
#logger.error "[ZipDown] ===> #{e}"
|
||||||
#@error = e
|
#@error = e
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue