https://devhubby.com/thread/how-to-customize-error-handling-in-smarty