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
F18839682: D21561.id.diff
Mon, Oct 27, 6:13 PM
F18833846: D21561.diff
Sun, Oct 26, 6:05 AM
F18787532: D21561.id51348.diff
Wed, Oct 15, 12:11 AM
F18782386: D21561.diff
Mon, Oct 13, 1:24 AM
F18777095: D21561.id.diff
Sat, Oct 11, 12:54 AM
F18777052: D21561.id51330.diff
Sat, Oct 11, 12:45 AM
F18772248: D21561.id51348.diff
Oct 9 2025, 1:21 AM
F18746027: D21561.id.diff
Oct 3 2025, 10:49 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