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
F19907486: D21561.id51348.diff
Wed, Apr 1, 11:13 AM
F19900794: D21561.diff
Mon, Mar 30, 6:03 AM
F19827093: D21561.diff
Mar 9 2026, 5:56 AM
F19803132: D21561.id.diff
Mar 1 2026, 9:12 PM
F19798595: D21561.diff
Feb 27 2026, 9:34 PM
F19798013: D21561.id51330.diff
Feb 27 2026, 8:20 PM
F19797157: D21561.diff
Feb 27 2026, 6:44 PM
F19795904: D21561.id51330.diff
Feb 27 2026, 9:19 AM
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