ReservationShortfallException
extends RuntimeException
in package
FinalYes
Thrown inside the reserve() transaction when allowPartial=false and the waterfall could not cover every requested unit. Throwing (rather than returning) is deliberate: it rolls the whole transaction back so the partial reserved increments already applied are undone — nothing is reserved on a strict shortfall. {@see \App\UI\Api\Store\Models\Services\ReservationService} catches it and turns it into a ReservationResult::error('insufficientStock') carrying the uncovered breakdown.
Table of Contents
Properties
- $notInStock : array<string|int, mixed>
Methods
- __construct() : mixed
Properties
$notInStock read-only
public
array<string|int, mixed>
$notInStock
= []
Methods
__construct()
public
__construct([array<int, string> $notInStock = [] ]) : mixed
Parameters
- $notInStock : array<int, string> = []
-
stockItemId => uncovered quantity (decimal string)
The default keeps the class autowirable by the DI scan (the Exceptions folder is scanned; a required param would break container compilation) — the throw site always passes the map.