code: func NewErrorFromPanic(err interface{}) *Error {
  
  	// Parse the filename and line from the originating line of app code.
  	// /Users/robfig/code/gocode/src/revel/examples/booking/app/controllers/hotels.go:191 (0x44735)
  	stack := string(debug.Stack())
  	frame, basePath := findRelevantStackFrame(stack)
  	if frame == -1 {
  		return nil
  	}
  
  	stack = stack[frame:]
  	stackElement := stack[:strings.Index(stack, "\n")]
  	colonIndex := strings.LastIndex(stackElement, ":")
  	filename := stackElement[:colonIndex]
  	var line int
  	fmt.Sscan(stackElement[colonIndex+1:], &line)
  
  	// Show an error page.
  	description := "Unspecified error"
  	if err != nil {
  		description = fmt.Sprint(err)
  	}
  	lines, readErr := ReadLines(filename)
  	if readErr != nil {
  		utilLog.Error("Unable to read file", "file", filename, "error", readErr)
  	}
  	return &Error{
  		Title:       "Runtime Panic",
  		Path:        filename[len(basePath):],
  		Line:        line,
  		Description: description,
  		SourceLines: lines,
  		Stack:       stack,
  	}
  }
docs: // NewErrorFromPanic method finds the deepest stack from in user code and
  // provide a code listing of that, on the line that eventually triggered
  // the panic.  Returns nil if no relevant stack frame can be found.