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
F12827886: D21561.diff
Thu, Mar 28, 10:27 AM
Unknown Object (File)
Jan 29 2024, 9:19 PM
Unknown Object (File)
Jan 27 2024, 5:34 AM
Unknown Object (File)
Dec 27 2023, 1:41 PM
Unknown Object (File)
Dec 27 2023, 1:41 PM
Unknown Object (File)
Dec 27 2023, 1:41 PM
Unknown Object (File)
Dec 22 2023, 3:29 AM
Unknown Object (File)
Dec 22 2023, 3:29 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