mothership-ec / cog

Cog
Other
2 stars 3 forks source link

Improved error messages and optimised sorting on collections #443

Closed thomasjthomasj closed 9 years ago

thomasjthomasj commented 9 years ago

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