Skip to content

Commit 9ed71f9

Browse files
committed
docs
1 parent 57002c4 commit 9ed71f9

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

ui/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,13 @@ func (w *UList) JawsUpdate(e *jaws.Element) {
112112
w.UpdateContainer(e)
113113
}
114114
```
115+
116+
## Container error behavior
117+
118+
`ContainerHelper` treats child render/update failures as application bugs.
119+
120+
- During initial render, child render failures are returned as errors.
121+
- During updates, append render failures are reported through `MustLog` (and
122+
may panic if no logger is configured).
123+
- After such failures, partial DOM/request state updates are expected; state may
124+
remain inconsistent until a subsequent full render/reload.

ui/containerhelper.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ import (
1717
//
1818
// A ContainerHelper belongs to a widget instance and is intended for render-scoped
1919
// widget lifetimes (for example widgets created via RequestWriter helper methods).
20+
//
21+
// Error model:
22+
// Child render/update failures are treated as application bugs. Initial-render
23+
// errors are returned to the caller, and update-time append render errors are
24+
// reported through MustLog (which may panic when no logger is configured).
25+
// After such failures, DOM and request-tracked element state may be partially
26+
// updated and therefore inconsistent until the next full render/reload.
2027
type ContainerHelper struct {
2128
Container core.Container
2229
Tag any

0 commit comments

Comments
 (0)