package
module
Version:
v0.0.0-...-f0989ed
Opens a new window with list of versions in this module.
Published: Dec 24, 2016
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
errhtml

This Go package can render runtime errors/panics to HTML. Useful during development.
Examples

Install
go get github.com/stephanos/errhtml
Documentation
godoc.org
Credits
Most of the code/template from the Revel framework.
License
MIT (see LICENSE).
Documentation
¶
func NewError(err interface{}, sources ...Source) error
NewError creates an error that can be rendered to HTML.
It receives an error, from a panic or not, and an optional error source.
func Render(err interface{}, w io.Writer)
Render creates an error context from the passed-in error and
renders it to the passed-in writer.
Source represents the origin of an error.
NewFileSource creates a new error source from a file path and line.
NewTextSource creates a new error source from a text.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.