How to get error information when there is an error in PHP chain call
The error message here is not a simple string. For example, during the chain call process, a certain function may need to return an array when it does not meet a certain condition, and directly report an error, saying that the array cannot call the next function, but how? Is it possible to stop calling further when a certain function in the middle returns?
try catch
Is it like this below?
Play online https://glot.io/snippets/ereygerdv3
throw new \Exception('error');