$source_type ) )->parse(); $renderer = new AIOM_JS_Renderer(); $renderer->setFormatter( new AIOM_JS_Formatter() ); $out = $renderer->render( $ast ); } catch ( Exception $e ) { // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Internal message, logged and escaped on display, never printed. throw new AIOM_Minify_Exception( 'JavaScript parse error: ' . $e->getMessage() ); } catch ( Error $e ) { // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Internal message, logged and escaped on display, never printed. throw new AIOM_Minify_Exception( 'JavaScript minifier error: ' . $e->getMessage() ); } if ( ! is_string( $out ) ) { // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Internal message, logged and escaped on display, never printed. throw new AIOM_Minify_Exception( 'JavaScript renderer returned no output.' ); } return $out; } }