Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97535 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66576 invoked from network); 6 Jan 2017 17:33:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2017 17:33:44 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:37643] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/37-23307-6F4DF685 for ; Fri, 06 Jan 2017 12:33:43 -0500 Received: by mail-wm0-f52.google.com with SMTP id t79so39569612wmt.0 for ; Fri, 06 Jan 2017 09:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oXNjgLdswUrPfrv9jj4HYLKJMwnPY4GiPSSU1sxjNxg=; b=VxxARbGIJ35ANUdPRlYRCxA6ca4Tv2cbI6PYzY/3qcbkiR60djFHZn5QDO7IFuwc3D 9lyy2WIu9MzzzVPbCmbw4wHx5rVzW3dWlLko8l4YIxnbvWOtLAJ+aaDgbIGYgrCFfVxK Mi2BYrcNxc9U/LC9A8J9+l8cxLGWeSyjbAc12vk7bGfoPLS/4r0V+g4HCFfMcr+HHrYw VxkmUiHfCKS4hhRQMPkzunG8YJ3RniFdRNtQ0K6pAjxAbaAGstmnb21bOAT9oHyDrgem saMOcF/ZaNYutF0lcKjfxIkoEiWPfCZPiPxflKVAeXBBWpmK4fKIONXTt19V8/UWSlPH v8sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oXNjgLdswUrPfrv9jj4HYLKJMwnPY4GiPSSU1sxjNxg=; b=FvT4CaaohOGKRwKuyx5m31v3uKFRQDOL4sjE4zEDkeLOFFciISXFH2furKm1D9SzEI Q0n4Y/iHkAfuXXxMUHl8+1XU/eC1P2a8oVCzKuvxc8WR+CZetHGT0RMfrdbhbU4+64r2 2/3dFpTehXquxhVITHwlzaLct7VuNLrhZVJvrv/SVN2UecBW5mTi8aDpHtOw2oX3NlK7 PNIj2+B4mctMzJCjgDLUtzkbKKj3Ds+uB9D0qGLmkgcMG2zCR3mkYJSGYIYH6RW2z4jt cnkKzbGnBaawM0eRQJ2ZubbH4qcqoyE0UE1B0rMNmjQplowLi2Rqsn5PzKBZBVVk/HPX NhRw== X-Gm-Message-State: AIkVDXJZHNBDdm6wePQshRB5M1BAH9w/Zo3JZ+wsDVwopm0AyFb1H3K5WXWgAyuhodMWTp42fHGrswIZzQY0lw== X-Received: by 10.28.5.70 with SMTP id 67mr4326206wmf.32.1483724019170; Fri, 06 Jan 2017 09:33:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.173.106 with HTTP; Fri, 6 Jan 2017 09:33:38 -0800 (PST) Received: by 10.194.173.106 with HTTP; Fri, 6 Jan 2017 09:33:38 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Jan 2017 18:33:38 +0100 Message-ID: To: Wes Cc: PHP Internals List Content-Type: multipart/alternative; boundary=001a11443a361b86c50545706bd8 Subject: Re: [PHP-DEV][RFC][VOTE] Throwable error code's type generalization From: ocramius@gmail.com (Marco Pivetta) --001a11443a361b86c50545706bd8 Content-Type: text/plain; charset=UTF-8 On 6 Jan 2017 18:27, "Wes" wrote: Hi Marco \o, linking to the discussion thread http://externals.io/thread/573 because I don't have much more to add. I think the throwable's code is almost never used regardless, but this could give users more opportunities to do something useful with it as Niklas stated in previous thread. Changing PDO errors to be int is an option, too, but I don't see that happening, not even in a major version. It would be a huge non-bc change for very very little improvement... This instead could open up to new uses for the property, that again is barely used these days, while also fixing the PDO inconsistency. `Exception#getCode()` is mostly used when re-throwing exceptions as different exception types, and the API naming makes for very hard searches for usages on Github too. In doctrine, we use it to exactly to decide what to throw (specific exception type). If you are saying that `getCode` is mostly unused, consider proposing a deprecation RFC instead, and provide an API specific to your use case as a replacement. --001a11443a361b86c50545706bd8--