An OsidList that always throws — propagate an exception through an OsidList boundary.
An error list holds an OperationFailedException
and re-throws it on the first call to getNext(). It lets you return a
well-typed OsidList from a method signature while signaling that the underlying query
failed — keeping the error deferred until the caller actually tries to consume the list.
hasNext() returns false and
available() returns 0, so callers that check before consuming will skip
the list cleanly.
| Parameter | Type | Description |
|---|---|---|
cause |
OperationFailedException |
the exception to re-throw on iteration |
| Parameter | Type | Description |
|---|---|---|
cause |
OperationFailedException |
the exception to carry |
Returns OsidObjectList