Throw exceptions instead of returning falsy values

Created on 7 March 2019, about 6 years ago
Updated 11 April 2025, 16 days ago

Key module defines exceptions since Add Key-specific exceptions β†’ but it does not use them anywhere. All methods work like procedural codes usually, returns NULL or FALSE if an error occurs. There is no method description that would define that any of the described exceptions could be thrown by the method.

Suggested solution:
Instead of returning falsy values, throw appropriate exceptions with useful exceptions messages and exceptions codes. This is probably a BC breaking change so it could be implemented only in new 7.x-4.x and 8.x-2.x branches.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary mxr576 Hungary

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024