draperlaboratory / cbat_tools

Program analysis tools developed at Draper on the CBAT project.
MIT License
102 stars 14 forks source link

Return an Error type instead of exitting the program #234

Closed fortunac closed 4 years ago

fortunac commented 4 years ago

In the WP frontend, if the user inputs an invalid option, wp will just print out an error message and call exit 1. Instead of this, Parameters.validate and Analysis.run should return an Extension.Error.t and then in the callback, do

Parameters.validate params files >>= fun () ->
Analysis.run params files ctxt >>= fun () ->
Ok ()