mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Added error handling for systems loader
This commit is contained in:
parent
136ee0bfed
commit
c85b4023cf
@ -119,7 +119,13 @@ var rootCmd = &cobra.Command{
|
||||
var err error
|
||||
|
||||
c := ctx.New(EMBEDFS, &CFG, LOG)
|
||||
_ = loadSystems(&c) // TODO: Handle errs
|
||||
errs := loadSystems(&c)
|
||||
if len(errs) > 0 {
|
||||
for _, err = range errs {
|
||||
c.Logger.Error(err)
|
||||
}
|
||||
panic("Error(s) loading system(s)")
|
||||
}
|
||||
|
||||
tui := tea.NewProgram(ui.NewModel(&c), tea.WithAltScreen())
|
||||
err = tui.Start()
|
||||
|
Loading…
Reference in New Issue
Block a user