code: func ToFileError(fileType string, err error) FileError {
  	for _, handle := range lineNumberExtractors {
  		lno, col := handle(err)
  		offset, typ := extractOffsetAndType(err)
  		if fileType == "" {
  			fileType = typ
  		}
  
  		if lno > 0 || offset != -1 {
  			return NewFileError(fileType, offset, lno, col, err)
  		}
  	}
  	// Fall back to the pointing to line number 1.
  	return NewFileError(fileType, -1, 1, 1, err)
  }
docs: // ToFileError will convert the given error to an error supporting
  // the FileError interface.