From cc592b63fddda324755f8abc0e0c4029a7dbeb22 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Wed, 24 Mar 2021 09:07:16 -0700 Subject: [PATCH] fix(core): trace instead of throw --- packages/core/ui/core/view/index.ios.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); + } } } }