mirror of
https://github.com/neocities/neocities.git
synced 2025-08-05 09:11:28 +02:00
better error reporting to help fix bugs
This commit is contained in:
parent
b782632b69
commit
d56edd80ec
2 changed files with 14 additions and 4 deletions
6
app.rb
6
app.rb
|
@ -42,9 +42,7 @@ error do
|
|||
from: 'web@neocities.org',
|
||||
to: 'errors@neocities.org',
|
||||
subject: "[Neocities Error] #{env['sinatra.error'].class}: #{env['sinatra.error'].message}",
|
||||
body: "#{request.request_method} #{request.path}\n\n" +
|
||||
(current_site ? "Site: #{current_site.username}\nEmail: #{current_site.email}\n\n" : '') +
|
||||
env['sinatra.error'].backtrace.join("\n")
|
||||
body: erb(:'views/templates/email/error')
|
||||
})
|
||||
|
||||
if @api
|
||||
|
@ -54,4 +52,4 @@ error do
|
|||
erb :'error'
|
||||
end
|
||||
|
||||
Dir['./app/**/*.rb'].each {|f| require f}
|
||||
Dir['./app/**/*.rb'].each {|f| require f}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue