Templater

put Eception to te use block
also it is a good paractice raise custom exceptions
So you can create your own exception class that will extend RuntimeExceptionn for example
and throw the object of your type