Fix incorrectly named "debug" prefix (#114117)
This commit is contained in:
parent
e0f7394038
commit
c8fc2858de
@ -1549,7 +1549,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
/// * [DebugCreator], which the [widgets] library uses as values for this field.
|
/// * [DebugCreator], which the [widgets] library uses as values for this field.
|
||||||
Object? debugCreator;
|
Object? debugCreator;
|
||||||
|
|
||||||
void _debugReportException(String method, Object exception, StackTrace stack) {
|
void _reportException(String method, Object exception, StackTrace stack) {
|
||||||
FlutterError.reportError(FlutterErrorDetails(
|
FlutterError.reportError(FlutterErrorDetails(
|
||||||
exception: exception,
|
exception: exception,
|
||||||
stack: stack,
|
stack: stack,
|
||||||
@ -2007,7 +2007,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
performLayout();
|
performLayout();
|
||||||
markNeedsSemanticsUpdate();
|
markNeedsSemanticsUpdate();
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
_debugReportException('performLayout', e, stack);
|
_reportException('performLayout', e, stack);
|
||||||
}
|
}
|
||||||
assert(() {
|
assert(() {
|
||||||
_debugActiveLayout = debugPreviousActiveLayout;
|
_debugActiveLayout = debugPreviousActiveLayout;
|
||||||
@ -2151,7 +2151,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
_debugReportException('performResize', e, stack);
|
_reportException('performResize', e, stack);
|
||||||
}
|
}
|
||||||
assert(() {
|
assert(() {
|
||||||
_debugDoingThisResize = false;
|
_debugDoingThisResize = false;
|
||||||
@ -2173,7 +2173,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
_debugReportException('performLayout', e, stack);
|
_reportException('performLayout', e, stack);
|
||||||
}
|
}
|
||||||
assert(() {
|
assert(() {
|
||||||
_debugActiveLayout = debugPreviousActiveLayout;
|
_debugActiveLayout = debugPreviousActiveLayout;
|
||||||
@ -2831,7 +2831,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
assert(!_needsLayout); // check that the paint() method didn't mark us dirty again
|
assert(!_needsLayout); // check that the paint() method didn't mark us dirty again
|
||||||
assert(!_needsPaint); // check that the paint() method didn't mark us dirty again
|
assert(!_needsPaint); // check that the paint() method didn't mark us dirty again
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
_debugReportException('paint', e, stack);
|
_reportException('paint', e, stack);
|
||||||
}
|
}
|
||||||
assert(() {
|
assert(() {
|
||||||
debugPaint(context, offset);
|
debugPaint(context, offset);
|
||||||
|
@ -2733,7 +2733,7 @@ class BuildOwner {
|
|||||||
try {
|
try {
|
||||||
element.rebuild();
|
element.rebuild();
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
_debugReportException(
|
_reportException(
|
||||||
ErrorDescription('while rebuilding dirty elements'),
|
ErrorDescription('while rebuilding dirty elements'),
|
||||||
e,
|
e,
|
||||||
stack,
|
stack,
|
||||||
@ -3101,7 +3101,7 @@ class BuildOwner {
|
|||||||
// Catching the exception directly to avoid activating the ErrorWidget.
|
// Catching the exception directly to avoid activating the ErrorWidget.
|
||||||
// Since the tree is in a broken state, adding the ErrorWidget would
|
// Since the tree is in a broken state, adding the ErrorWidget would
|
||||||
// cause more exceptions.
|
// cause more exceptions.
|
||||||
_debugReportException(ErrorSummary('while finalizing the widget tree'), e, stack);
|
_reportException(ErrorSummary('while finalizing the widget tree'), e, stack);
|
||||||
} finally {
|
} finally {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Timeline.finishSync();
|
Timeline.finishSync();
|
||||||
@ -4965,7 +4965,7 @@ abstract class ComponentElement extends Element {
|
|||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
_debugDoingBuild = false;
|
_debugDoingBuild = false;
|
||||||
built = ErrorWidget.builder(
|
built = ErrorWidget.builder(
|
||||||
_debugReportException(
|
_reportException(
|
||||||
ErrorDescription('building $this'),
|
ErrorDescription('building $this'),
|
||||||
e,
|
e,
|
||||||
stack,
|
stack,
|
||||||
@ -4985,7 +4985,7 @@ abstract class ComponentElement extends Element {
|
|||||||
assert(_child != null);
|
assert(_child != null);
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
built = ErrorWidget.builder(
|
built = ErrorWidget.builder(
|
||||||
_debugReportException(
|
_reportException(
|
||||||
ErrorDescription('building $this'),
|
ErrorDescription('building $this'),
|
||||||
e,
|
e,
|
||||||
stack,
|
stack,
|
||||||
@ -5790,7 +5790,7 @@ abstract class RenderObjectElement extends Element {
|
|||||||
ErrorDescription('The ownership chain for the RenderObject that received the parent data was:\n ${debugGetCreatorChain(10)}'),
|
ErrorDescription('The ownership chain for the RenderObject that received the parent data was:\n ${debugGetCreatorChain(10)}'),
|
||||||
]);
|
]);
|
||||||
} on FlutterError catch (e) {
|
} on FlutterError catch (e) {
|
||||||
_debugReportException(ErrorSummary('while looking for parent data.'), e, e.stackTrace);
|
_reportException(ErrorSummary('while looking for parent data.'), e, e.stackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -6121,7 +6121,7 @@ abstract class RenderObjectElement extends Element {
|
|||||||
// while still allowing debuggers to break on exception. Since the tree
|
// while still allowing debuggers to break on exception. Since the tree
|
||||||
// is in a broken state, adding the ErrorWidget would likely cause more
|
// is in a broken state, adding the ErrorWidget would likely cause more
|
||||||
// exceptions, which is not good for the debugging experience.
|
// exceptions, which is not good for the debugging experience.
|
||||||
_debugReportException(ErrorSummary('while applying parent data.'), e, e.stackTrace);
|
_reportException(ErrorSummary('while applying parent data.'), e, e.stackTrace);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
@ -6545,7 +6545,7 @@ class DebugCreator {
|
|||||||
String toString() => element.debugGetCreatorChain(12);
|
String toString() => element.debugGetCreatorChain(12);
|
||||||
}
|
}
|
||||||
|
|
||||||
FlutterErrorDetails _debugReportException(
|
FlutterErrorDetails _reportException(
|
||||||
DiagnosticsNode context,
|
DiagnosticsNode context,
|
||||||
Object exception,
|
Object exception,
|
||||||
StackTrace? stack, {
|
StackTrace? stack, {
|
||||||
|
@ -120,7 +120,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
|
|||||||
debugWidgetBuilderValue(widget, built);
|
debugWidgetBuilderValue(widget, built);
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
built = ErrorWidget.builder(
|
built = ErrorWidget.builder(
|
||||||
_debugReportException(
|
_reportException(
|
||||||
ErrorDescription('building $widget'),
|
ErrorDescription('building $widget'),
|
||||||
e,
|
e,
|
||||||
stack,
|
stack,
|
||||||
@ -136,7 +136,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
|
|||||||
assert(_child != null);
|
assert(_child != null);
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
built = ErrorWidget.builder(
|
built = ErrorWidget.builder(
|
||||||
_debugReportException(
|
_reportException(
|
||||||
ErrorDescription('building $widget'),
|
ErrorDescription('building $widget'),
|
||||||
e,
|
e,
|
||||||
stack,
|
stack,
|
||||||
@ -358,7 +358,7 @@ class _RenderLayoutBuilder extends RenderBox with RenderObjectWithChildMixin<Ren
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlutterErrorDetails _debugReportException(
|
FlutterErrorDetails _reportException(
|
||||||
DiagnosticsNode context,
|
DiagnosticsNode context,
|
||||||
Object exception,
|
Object exception,
|
||||||
StackTrace stack, {
|
StackTrace stack, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user