ambiorix-web / ambiorix

🖥️ Web framework for R
http://ambiorix.dev
GNU General Public License v3.0
211 stars 9 forks source link

ft: create error handler method #64

Closed kennedymwavu closed 7 months ago

kennedymwavu commented 7 months ago

Add a method to set the error handler

Closes #63

JohnCoene commented 7 months ago

Do you mind set_error instead of set_error_handler that would make it more consistent with other methods (e.g.: set_404 ~set_404_handler~).

Also maybe check that the handler is indeed a function (there is an {assertthat} function for that somewhere in the package.

kennedymwavu commented 7 months ago

Very sensible. Making the suggested changes.

kennedymwavu commented 7 months ago

Don't merge yet... Let me make one more change: Use all() instead of && for backward compatibility.

kennedymwavu commented 7 months ago

LGTM now.

JohnCoene commented 7 months ago

Thanks!