On 6 Jan 2017 18:27, "Wes" <netmo....@gmail.com> 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.