1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-10-16 06:13:43 -04:00
gitea/modules
zeripath 8f3aaef374
Improve template error reporting (#23396)
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>
2023-03-20 15:56:48 -05:00
..
actions Convert GitHub event on actions and fix some pull_request events. (#23037) 2023-03-14 20:50:51 +08:00
activitypub
analyze
auth Fix various bugs for "install" page (#23194) 2023-03-04 10:12:02 +08:00
avatar Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
base Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
cache Improve cache context (#23330) 2023-03-08 11:57:05 -06:00
charset Fix isAllowed of escapeStreamer (#22814) 2023-02-09 20:51:36 +08:00
container
context Improve template error reporting (#23396) 2023-03-20 15:56:48 -05:00
csv Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
doctor add path prefix to ObjectStorage.Iterator (#23332) 2023-03-13 18:23:51 +08:00
emoji
eventsource
generate
git Handle files starting with colons in WalkGitLog (#22935) 2023-03-16 11:03:04 -05:00
gitgraph Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
graceful
hcaptcha
highlight test_env: hardcode major go version in use (#23464) 2023-03-14 16:09:01 -04:00
hostmatcher
html
httpcache Set X-Gitea-Debug header once (#23361) 2023-03-08 15:40:04 -05:00
httplib
indexer Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
issue/template
json
label Reduce duplicate and useless code in options (#23369) 2023-03-08 17:31:27 +08:00
lfs Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
log
markup Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
mcaptcha
metrics include build info in Prometheus metrics (#22819) 2023-02-08 19:54:01 +02:00
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror
nosql
notification
options Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
packages Return repository in npm package metadata endpoint (#23539) 2023-03-17 14:39:19 -04:00
paginator
pprof
private
process
proxy Use proxy for pull mirror (#22771) 2023-02-11 08:39:50 +08:00
proxyprotocol
public Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
queue Properly flush unique queues on startup (#23154) 2023-02-28 17:55:43 -05:00
recaptcha
references
regexplru
repository Fix pull request update showing too many commits with multiple branches (#22856) 2023-03-09 12:14:22 -06:00
secret Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
session
setting Add .patch to attachment.ALLOWED_TYPES (#23580) 2023-03-19 15:58:43 -04:00
sitemap
ssh
storage add path prefix to ObjectStorage.Iterator (#23332) 2023-03-13 18:23:51 +08:00
structs Add absent repounits to create/edit repo API (#23500) 2023-03-16 12:30:42 -05:00
svg
sync
system
templates Improve template error reporting (#23396) 2023-03-20 15:56:48 -05:00
test Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
timeutil Make time tooltips interactive (#23526) 2023-03-16 15:40:56 -05:00
translation
turnstile
typesniffer Do not recognize text files as audio (#23355) 2023-03-07 22:40:41 -05:00
updatechecker
upload
uri
user
util Use CleanPath instead of path.Clean (#23371) 2023-03-08 20:17:39 +08:00
validation
watcher
web
webhook