nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

refactor: print error and exit instead of panics #1417

Closed Truenya closed 1 year ago

Truenya commented 1 year ago

panics replaced with printing error and Exit, mostly In some cases, like network configuration, replaced with just message about error.

eyberg commented 1 year ago

a few things:

1) I wouldn't default to colorize output - there are quite a few tools that consume output from ops - colorizing is really only for end-users

2) I wouldn't name that wrapper Fatal since that is being replaced and has a specific meaning in go stdlib

3) we already have a logger here, https://github.com/nanovms/ops/blob/master/log/logger.go so we shouldn't duplicate existing logic