Skip to content

Commit b5a2367

Browse files
committed
Made the exception thrown after the element recursion limit is reached more helpful
1 parent e2e5ce8 commit b5a2367

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ MLEM uses [semantic versioning](https://semver.org/). Potentially breaking chang
77
Additions
88
- Added UiSystem.OnElementAreaDirty and Element.OnAreaDirty events
99

10+
Improvements
11+
- Made the exception thrown after the element recursion limit is reached more helpful
12+
1013
## 8.0.0
1114

1215
### MLEM

MLEM.Ui/Elements/Element.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ void ILayoutItem.OnLayoutRecursion(int recursion, ILayoutItem relevantChild) {
11041104
this.System.Metrics.MaxRecursionDepth = recursion;
11051105

11061106
if (recursion >= Element.RecursionLimit) {
1107-
var exceptionText = $"The area of {this} has recursively updated too often.";
1107+
var exceptionText = $"The area of {this} has recursively updated more often than the configured Element.RecursionLimit. This issue may occur due to this element or one of its children containing conflicting auto-sizing settings, a custom element setting its area dirty too frequently, or this element being part of a complex layout tree that should be split up into multiple groups.";
11081108
if (relevantChild != null)
11091109
exceptionText += $" Does its child {relevantChild} contain any conflicting auto-sizing settings?";
11101110
throw new ArithmeticException(exceptionText);

0 commit comments

Comments
 (0)