mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
error reporting
This commit is contained in:
parent
f059772d5e
commit
38b2914e70
2 changed files with 17 additions and 0 deletions
12
app.rb
12
app.rb
|
@ -16,6 +16,17 @@ not_found do
|
|||
slim :'not_found'
|
||||
end
|
||||
|
||||
error do
|
||||
EmailWorker.perform_async({
|
||||
from: 'web@neocities.org',
|
||||
to: 'errors@neocities.org',
|
||||
subject: "[NeoCities Error] #{env['sinatra.error'].name}",
|
||||
body: "#{env['sinatra.error'].message}\n\n#{env['sinatra.error'].backtrace}"
|
||||
})
|
||||
|
||||
slim :'error'
|
||||
end
|
||||
|
||||
get '/?' do
|
||||
dashboard_if_signed_in
|
||||
slim :index
|
||||
|
@ -423,6 +434,7 @@ get '/password_reset_confirm' do
|
|||
end
|
||||
|
||||
get '/contact' do
|
||||
raise 'hell'
|
||||
slim :'contact'
|
||||
end
|
||||
|
||||
|
|
5
views/error.slim
Normal file
5
views/error.slim
Normal file
|
@ -0,0 +1,5 @@
|
|||
.row
|
||||
.span8.offset2.text-center
|
||||
h2 Site Error
|
||||
h4 There has been an error performing the requested action. We have been notified of the problem.
|
||||
h5 If you need to add any special information or if this error has not been resolved in a while, <a href="/contact">contact us</a> and report the problem. Thank you!
|
Loading…
Add table
Reference in a new issue