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
F15311113: D21561.id51348.diff
Thu, Mar 6, 9:47 AM
F15309583: D21561.id51330.diff
Thu, Mar 6, 7:27 AM
F15293283: D21561.id.diff
Wed, Mar 5, 3:45 AM
F15290229: D21561.id51348.diff
Tue, Mar 4, 10:59 PM
Unknown Object (File)
Mon, Feb 24, 6:36 PM
Unknown Object (File)
Wed, Feb 19, 8:29 PM
Unknown Object (File)
Feb 9 2025, 3:48 AM
Unknown Object (File)
Jan 28 2025, 5:45 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