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
F19509607: D21561.diff
Sat, Jan 10, 10:52 PM
F19509604: D21561.diff
Sat, Jan 10, 10:52 PM
F19063365: D21561.id.diff
Nov 29 2025, 6:20 PM
F19052802: D21561.diff
Nov 28 2025, 5:56 AM
F19014292: D21561.id51348.diff
Nov 22 2025, 7:30 PM
F18988131: D21561.diff
Nov 18 2025, 12:47 AM
F18914281: D21561.diff
Nov 9 2025, 6:46 AM
F18839682: D21561.id.diff
Oct 27 2025, 6:13 PM
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
Branch
regex1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25140
Build 34694: Run Core Tests
Build 34693: arc lint + arc unit