ReconfigureIO / goblin

convert from a Go AST to JSON
Apache License 2.0
42 stars 15 forks source link

Add JSONified errors and a -panic option. #48

Closed patrickt closed 7 years ago

patrickt commented 7 years ago

Up until now, error handling has been done through panic(), which isn't so great, as it just dumps the error text and a bunch of goroutine-related detritus to stderr. This patch adds an error field to the toplevel returned object; if it's present, an error has been encountered.

There is a huge wart here—the error type returned from parser syntax errors is opaque, so we can't extract its position information. We'll just have to parse the information on the Haskell side. Blech.

codecov-io commented 7 years ago

Codecov Report

Merging #48 into master will decrease coverage by 1.42%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
- Coverage   60.57%   59.14%   -1.43%     
==========================================
  Files           1        1              
  Lines         662      678      +16     
==========================================
  Hits          401      401              
- Misses        229      245      +16     
  Partials       32       32
Impacted Files Coverage Δ
goblin.go 59.14% <0%> (-1.43%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ac58ac9...5393bb5. Read the comment docs.