rejected
Create an already-rejected future with the given error.
This is useful when you need to return a future from a function but an error condition is already known.
Parameters
T | The type parameter for the future. |
errorMsg | The error message to reject with. |
Returns
A future that is already rejected with the given error.