jonas-p / go-shp

Go library for reading and writing ESRI Shapefiles. Pure Golang implementation based on the ESRI Shapefile technical description.
MIT License
255 stars 68 forks source link

Remove log.Fatal call from writer #21

Closed tdilo closed 6 years ago

tdilo commented 6 years ago

Same rationale for removing log.Fatal as in previous commit concerning the reader.

Kudos to @fawick for realizing that adding an error return value does not break API compatibility - the error will simply be ignored.

fawick commented 6 years ago

Handling the errors like this instead of forcing the whole program to shut down is definitely the right approach.

Using code will still compile, however anyone who uses Writer needs to be aware that encountered errors will no longer lead to an early exit of the process.

fawick commented 6 years ago

Thank you for your work, @tdilo!