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
Unknown Object (File)
Mon, May 5, 4:53 PM
Unknown Object (File)
Fri, Apr 25, 9:34 PM
Unknown Object (File)
Apr 12 2025, 4:16 AM
Unknown Object (File)
Apr 8 2025, 5:24 AM
Unknown Object (File)
Apr 4 2025, 1:15 AM
Unknown Object (File)
Mar 29 2025, 8:22 PM
Unknown Object (File)
Mar 29 2025, 10:28 AM
Unknown Object (File)
Mar 29 2025, 4:43 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