Page MenuHomePhabricator

Provide some "preg_*" wrappers which raise exceptions on failure
ClosedPublic

Authored by epriestley on Feb 17 2021, 8:44 PM.
Tags
None
Referenced Files
F18219729: D21561.diff
Tue, Aug 19, 12:14 PM
F18178975: D21561.diff
Sat, Aug 16, 2:44 AM
F18108724: D21561.diff
Mon, Aug 11, 8:58 AM
F18106492: D21561.id.diff
Sun, Aug 10, 11:06 PM
F17943996: D21561.id51348.diff
Thu, Jul 31, 9:09 AM
F17943995: D21561.id51330.diff
Thu, Jul 31, 9:09 AM
F17943679: D21561.id.diff
Thu, Jul 31, 8:37 AM
F17833501: D21561.diff
Jul 26 2025, 1:37 PM
Subscribers
None

Details

Summary

Ref T13608. Ref T13100. Ref T13586. Properly checking "preg_match()" and similar calls for failure and raising useful exceptions is complicated and error-prone. Provide wrapper functions with an API that's more consistent with the rest of the codebase: matches are returned; and errors raise detailed exceptions.

Test Plan

See next change.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable