librariesio / bibliothecary

:notebook_with_decorative_cover: Libraries.io Package Manager Manifest Parsers
https://libraries.io/rubygems/bibliothecary
GNU Affero General Public License v3.0
89 stars 36 forks source link

[8.7.3] Bibliothecary::FileParsingError: add error location to error, and expose via create_error_analysis #582

Closed tiegz closed 9 months ago

tiegz commented 9 months ago

Example

Bibliothecary::Analyser.create_error_analysis(...) (this method is what creates the errors returned from biblio's analyses)

Before:

{ 
  ...,
  error_message: "pyproject.toml: no implicit conversion of Hash into Array", 
  ... 
}

After:

{ 
  ..., 
  error_message: "pyproject.toml: no implicit conversion of Hash into Array", 
  error_location: "parsers/pypi.rb:109:in `+'", 
  ... 
}