From 034d08971a1b0c7f02135dfaeb150439e902bf2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Fri, 19 May 2023 21:10:48 +0800 Subject: [PATCH] print error --- app/controllers/announcements_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index fce2b0e..fe15a7f 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -675,7 +675,8 @@ class AnnouncementsController < ApplicationController render :file => "#{Rails.root}/app/views/errors/403.html", :layout => false, :status => :not_found, :content_type => 'text/html' return end - rescue + rescue => e + puts [e, e.backtrace] render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found, :content_type => 'text/html' return end