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
F19797157: D21561.diff
Fri, Feb 27, 6:44 PM
F19795904: D21561.id51330.diff
Fri, Feb 27, 9:19 AM
F19785856: D21561.id51348.diff
Wed, Feb 25, 1:57 AM
F19779003: D21561.id51330.diff
Mon, Feb 23, 2:08 PM
F19778999: D21561.id51330.diff
Mon, Feb 23, 2:08 PM
F19578187: D21561.diff
Sun, Feb 1, 12:15 PM
F19554540: D21561.diff
Thu, Jan 29, 11:19 PM
F19536138: D21561.diff
Jan 21 2026, 10:07 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