This PR adds better error messaging to the base Collection. When collections error, there is no way of knowing which collection is actually throwing the error if it is caught and displayed elsewhere in the code. This adds get_class($this) to all of the error messages to make it easier to debug. It also resolves the issue where throwing an exception in setKey() would break when setting the key as a callable
This PR adds better error messaging to the base Collection. When collections error, there is no way of knowing which collection is actually throwing the error if it is caught and displayed elsewhere in the code. This adds
get_class($this)
to all of the error messages to make it easier to debug. It also resolves the issue where throwing an exception insetKey()
would break when setting the key as a callable