lib/webrick/httpservlet/erbhandler.rb in webrick-1.3.1 vs lib/webrick/httpservlet/erbhandler.rb in webrick-1.4.0.beta1
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: false
#
# erbhandler.rb -- ERBHandler Class
#
# Author: IPR -- Internet Programming with Ruby -- writers
# Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
@@ -54,10 +55,10 @@
begin
data = open(@script_filename){|io| io.read }
res.body = evaluate(ERB.new(data), req, res)
res['content-type'] ||=
HTTPUtils::mime_type(@script_filename, @config[:MimeTypes])
- rescue StandardError => ex
+ rescue StandardError
raise
rescue Exception => ex
@logger.error(ex)
raise HTTPStatus::InternalServerError, ex.message
end