all repos — homestead @ a9f47f4e4ed3223e86dc1d5c3edd005b8d9ce589

Code for my website

refactor: return errors with stack traces, where appropriate

Alan Pearce
commit

a9f47f4e4ed3223e86dc1d5c3edd005b8d9ce589

parent

f17c0bd9ce8ad16b39c9c5ba80c917049e135bed

1 file changed, 3 insertions(+), 2 deletions(-)

changed files
M internal/markdown/markdown.gointernal/markdown/markdown.go
@@ -7,6 +7,7 @@ fences "github.com/stefanfritsch/goldmark-fences"
"github.com/yuin/goldmark" "github.com/yuin/goldmark/extension" htmlrenderer "github.com/yuin/goldmark/renderer/html" + "gitlab.com/tozd/go/errors" ) var markdown = goldmark.New(
@@ -21,6 +22,6 @@ &fences.Extender{},
), ) -func Convert(content []byte, w io.Writer) error { - return markdown.Convert(content, w) +func Convert(content []byte, w io.Writer) errors.E { + return errors.WithStack(markdown.Convert(content, w)) }