preaction / Yancy

The Best Web Framework Deserves the Best Content Management System
http://preaction.me/yancy/
Other
54 stars 21 forks source link

Add import stringifying the log message #70

Closed wbazant closed 5 years ago

wbazant commented 5 years ago

I think being a base to Mojolicious::Controller doesn't give you to_json, at least in Mojolicious 8.23.

This PR replaces a log message like

[2019-08-29 11:38:47.99478] [6638] [error] Undefined subroutine &Yancy::Controller::Yancy::to_json called at /Library/Perl/5.18/Yancy/Controller/Yancy.pm line 310.

with a slightly less cryptic

[2019-08-29 11:42:49.78252] [6643] [error] Sorry type '"array"' is not handled yet, only string|number|integer|boolean is supported. at /Library/Perl/5.18/Yancy/Controller/Yancy.pm line 311.
coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.005%) to 93.164% when pulling 476ba222f4e031b55f29eef66725880572f16ff2 on wbazant:patch-1 into 20f5432a5fd3468eaf86d6d3fc55916e852d8e5c on preaction:master.

preaction commented 5 years ago

That'll teach me not to test failure cases. Thanks!