mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
fix(core): trace instead of throw
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user