mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-389 Log an exception and terminate if widget config is invalid
If, on startup, a widget's positional configuration is invalid (ie: cannot be displayed onscreen) then terminate the app and inform about which widget is erroring
This commit is contained in:
@@ -23,9 +23,9 @@ func NewWidget(app *tview.Application, name string) *Widget {
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name)))
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name())))
|
||||
widget.View.Clear()
|
||||
|
||||
content := fmt.Sprintf("Widget %s does not exist", widget.Name)
|
||||
content := fmt.Sprintf("Widget %s does not exist", widget.Name())
|
||||
widget.View.SetText(content)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user