From 2155162ddd64a0d5d4955914c08df82f8c3442fb Mon Sep 17 00:00:00 2001 From: Jeremy P Date: Thu, 27 Jul 2023 18:05:06 -0700 Subject: [PATCH] Less_Tree_Mixin_Call: Include mixin name in error message When a mixin call fails, debugging mixins can be a bit painful when you don't know which one is erroring. Change-Id: Ibd5a68f0449fbca5716147cff680368c8a564c81 --- lib/Less/Tree/Mixin/Call.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Less/Tree/Mixin/Call.php b/lib/Less/Tree/Mixin/Call.php index 61e10fef..465f07dd 100644 --- a/lib/Less/Tree/Mixin/Call.php +++ b/lib/Less/Tree/Mixin/Call.php @@ -142,7 +142,8 @@ public function compile( $env ) { } if ( $isOneFound ) { - throw new Less_Exception_Compiler( 'No matching definition was found for `' . $this->Format( $args ) . '`', null, $this->index, $this->currentFileInfo ); + $selectorName = $this->selector->toCSS(); + throw new Less_Exception_Compiler( 'No matching definition was found for ' . $selectorName . ' with args `' . $this->Format( $args ) . '`', null, $this->index, $this->currentFileInfo ); } else { throw new Less_Exception_Compiler( trim( $this->selector->toCSS() ) . " is undefined in " . $this->currentFileInfo['filename'], null, $this->index );