cakephp / chronos

A standalone DateTime library originally based off of Carbon
http://book.cakephp.org/chronos
MIT License
1.36k stars 63 forks source link

Improve exception messages #447

Closed dereuromark closed 11 months ago

dereuromark commented 11 months ago
1) Data\Test\TestCase\Model\Table\AddressesTableTest::testTouch
InvalidArgumentException: Time string is not in expected format: "HH[:.]mm" or "HH[:.]mm[:.]ss.u".

/home/runner/work/cakephp-data/cakephp-data/vendor/cakephp/chronos/src/ChronosTime.php:122

hard to understand

it is possible to give the values for quicker debugging however.

InvalidArgumentException: Time string `-2 seconds` is not in expected format `HH[:.]mm` or `HH[:.]mm[:.]ss.u`.

fixed also some formatting around code fencing.