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)
Mon, Dec 9, 11:53 AM
Unknown Object (File)
Sun, Dec 8, 7:37 PM
Unknown Object (File)
Sat, Dec 7, 3:14 PM
Unknown Object (File)
Thu, Dec 5, 5:50 PM
Unknown Object (File)
Tue, Dec 3, 10:07 PM
Unknown Object (File)
Tue, Dec 3, 10:07 PM
Unknown Object (File)
Tue, Dec 3, 10:06 PM
Unknown Object (File)
Tue, Dec 3, 9:52 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