code: func NewError(err error, code int, template string, handler ErrorHandler) ErrorContainer {
  	if err == nil {
  		panic("cannot supply nil error")
  	}
  
  	// template and code must be set if handler is nil
  	if handler == nil && (len(template) == 0 || code == 0) {
  		panic("template and code must be set if handler is nil")
  	}
  
  	return ErrorContainer{
  		Err:      err,
  		Code:     code,
  		Template: template,
  		Handler:  handler,
  	}
  }
docs: // NewError creates a new ErrorContainer that can be added to an errorManager.
  // If you provide a handler here (instead of nil) then the Errors middleware
  // will use your handler opposed to taking the default route of logging
  // and rendering. You must handle logging and rendering yourself.