bitrix-result-and-errors
Installation
SKILL.md
Result and Errors in Bitrix
Baseline: main 23.0+.
Philosophy
- User Errors →
Result+Error. Validation, business rules, "entity not found," "insufficient permissions." - Program Errors → Exceptions. Connection failure, missing mandatory module, broken configuration.
- One method — one clear contract: either it always returns
Result(and doesn't throw "normal" exceptions), or it guaranteed returns a value and throws\Throwablein exceptional cases.
Bitrix\Main\Result
Base object:
$result = new \Bitrix\Main\Result();