forgejo/modules/context
Giteabot a3b917151c
Improve template error reporting (#23396) (#23600)
Backport #23396 by @zeripath

There are multiple duplicate reports of errors during template rendering
due to broken custom templates.

Unfortunately the error returned here is somewhat difficult for users to
understand and it doesn't return the context of the error.

This PR attempts to parse the error returned by the template renderer to
add in some further context including the filename of the template AND
the preceding lines within that template file.

Ref #23274

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
2023-03-20 17:53:45 -04:00
..
access_log.go Render access log template as text instead of HTML (#23013) 2023-02-21 10:22:13 +08:00
api.go Set X-Gitea-Debug header once (#23361) (#23381) 2023-03-09 06:33:05 +08:00
api_org.go
api_test.go
auth.go
captcha.go Add new captcha: cloudflare turnstile (#22369) 2023-02-05 15:29:03 +08:00
context.go Improve template error reporting (#23396) (#23600) 2023-03-20 17:53:45 -04:00
csrf.go
form.go
org.go Add missing tabs to org projects page (#22705) (#23412) 2023-03-10 10:08:28 -06:00
package.go Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00
pagination.go Make branches list page operations remember current page (#23420) (#23460) 2023-03-14 20:51:14 +08:00
permission.go
private.go
repo.go Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
response.go
utils.go
xsrf.go
xsrf_test.go