|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
TedK Smarty n00b
Joined: 12 Sep 2019 Posts: 4
|
Posted: Tue Sep 24, 2019 11:44 am Post subject: Error handing when using plugins |
|
|
I created plugins so I can add data to the templates initiated from the templates. One of the plugins has an external and not always stable data source. Now I want to trigger an error in the template when the data source is not available. In V2 there was $smarty->trigger_error. What is the replacement of this in V3? Or what is the best way to return an error to the template? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Oct 02, 2019 8:55 pm Post subject: |
|
|
Depends, how severe you consider the problem, you can handle it in the plugin or just throw an exception.
There's no reason anything like that should exists in the templating engine. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|