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)
Feb 16 2023, 2:00 AM
Unknown Object (File)
Feb 5 2023, 9:54 PM
Unknown Object (File)
Feb 5 2023, 10:26 AM
Unknown Object (File)
Feb 5 2023, 12:00 AM
Unknown Object (File)
Nov 22 2022, 4:34 PM
Unknown Object (File)
Nov 22 2022, 4:34 PM
Unknown Object (File)
Nov 22 2022, 4:34 PM
Unknown Object (File)
Nov 17 2022, 2:33 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