Octachron / codept

Contextual Ocaml DEPendencies Tool: alternative ocaml dependency analyzer
Other
56 stars 10 forks source link

Make codept as a library (4/n) #28

Open dinosaure opened 1 year ago

dinosaure commented 1 year ago

About the fault.ml module, it has the ability to terminate the program when a critical error occurs. In the design of a library, it would be healthier to throw an exception so that the user can decide whether the program should terminate or not. How about throwing an exception instead of "exit 1" and documenting that it indicates a critical error?

Octachron commented 1 year ago

Throwing a Abort exception and installing an exception handler in an executable sounds healthier indeed.

dinosaure commented 1 month ago

Another point is about the formatter used by fault.ml. Actually, codept arbitrary uses stderr. As a library, it will be nice to set the formatter according upfront configuration.