From 74cd7be6b34528c75e49e85de0df204e754dfd46 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 16 Jan 2025 12:00:11 +0100 Subject: [PATCH] refactor(core): Make unsupported styling type error message clearer (#59563) The previous message would sound like a full sentence when using a signal without `()` (Example: Unsupported styling type function: [Input Signal: neutral]). The new formatting makes it a bit more obvious that the type itself is the problem. PR Close #59563 --- packages/core/src/render3/instructions/styling.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/render3/instructions/styling.ts b/packages/core/src/render3/instructions/styling.ts index 2d473468d24..45b9697d167 100644 --- a/packages/core/src/render3/instructions/styling.ts +++ b/packages/core/src/render3/instructions/styling.ts @@ -692,7 +692,9 @@ export function toStylingKeyValueArray( stringParser(styleKeyValueArray, unwrappedValue); } else { ngDevMode && - throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue); + throwError( + 'Unsupported styling type: ' + typeof unwrappedValue + ' (' + unwrappedValue + ')', + ); } return styleKeyValueArray; }