diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index 7b462be05..862db9f0e 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -88,10 +88,12 @@ export class View extends ViewCommon implements ViewDefinition { this.onMeasure(widthMeasureSpec, heightMeasureSpec); this._privateFlags |= PFLAG_LAYOUT_REQUIRED; - // flag not set, setMeasuredDimension() was not invoked, we raise - // an exception to warn the developer + // flag not set, setMeasuredDimension() was not invoked, we trace + // the exception to warn the developer if ((this._privateFlags & PFLAG_MEASURED_DIMENSION_SET) !== PFLAG_MEASURED_DIMENSION_SET) { - throw new Error('onMeasure() did not set the measured dimension by calling setMeasuredDimension() ' + this); + if (Trace.isEnabled()) { + Trace.write('onMeasure() did not set the measured dimension by calling setMeasuredDimension() ' + this, Trace.categories.Layout, Trace.messageType.error); + } } } }