Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128250 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 735B11A00BC for ; Mon, 28 Jul 2025 10:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753697727; bh=uMqqUSSPlRdG+eeGXTxz00j8D/OLT1OFc5bdjkIGma8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PQwcNMPKRrb09WPd+WB6TBSrQ5K+zhSoOy73uOMaeav7E8dR3WZejTNXVTpqnirOA qpUYflPky8+9x9Qq94gNFeS1YW8q7ssFxDghoQMLSIhLWdkz6EloNwJxMLXK08BZk5 Uc5pNDnfpZqnm3gLJ9p2v1y4qyvhGLoKbtHYXkWJ9JD+WvvODfhYdBS4roac9d7RV6 JvFcDOuOEVwj6ESxlAnThvvrFa5TFndO+/SAfaz70FLorDCi09k6lc2Y80FagVoB/T GjQMAukG12+FvwqtQzyawPSdBmjQpndoed92K0McAXxgH71ytGJBI1l6501lkwC1QY 5k9tDQqK4j7Mg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 81B1A1801E8 for ; Mon, 28 Jul 2025 10:15:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 28 Jul 2025 10:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1753697825; bh=3G56odtq6QQZTV4AtPPyfy1Y31noMSfriMK21qNKezs=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=mdD8IHGtuv7b28FS5rA9HvyBFyxsBKLrcUusLXOta2psh9RhbLF+G1HIVZ3upQJ1b h/HDiPQywtyl9IrXTEAPZ7APrIRpp5F2YoheHgpWizfWx3Nm9z9kCA9Y8Y5EcZdBPV 5rcFsa0DA0MHwtz9MyuAN5ymPOzcBJqmLVhV1PngeOzac1M5DMMIEl4cXsSYgLiiRi 6No6EjqASVGsMLoDVklACliwZNdThphy3XBKqaJjHJLKjyjtJOhcwpb3fGEG6JowXx mnojWozwkat5KeXxwqOW6kunlvXQbMJ05grKNOilhAv0J/hRKXdr5/c6Z30fhsjRpb Foui5IkSf1NPg== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 28 Jul 2025 12:17:05 +0200 To: Dmitry Derepko Cc: PHP internals Subject: Re: [PHP-DEV] [DISCUSSION] User-land Throwable In-Reply-To: References: Message-ID: <73a35675dff31a1eaf76b67af567194e@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-07-28 11:41, schrieb Dmitry Derepko: > A few years ago I found that a library printed error traces wrong. > After a little research I found that there was a mix of 3rd party > integration error + raised error around the current bridge > implementation > (http client). > > There were several PHP applications with microservices architecture > which I > had access to (docker + sources). > > So having the message and traces I'd like to have an error chain as it > can > be done chaining several errors through a new Exception(previous: $e). > But PHP does not allow you to manually implement Throwable. Instead you > should extend Exception. But after that you still cannot override the > getTrace() method because it's final. > > So my proposal is pretty simple: Remove both restrictions. I'm afraid I don't quite understand what actual goal you intend to solve with the proposal. The description of your use case is very abstract, can you provide a real-world example of a use-case you want to enable? Best regards Tim Düsterhus