How to write custom errors

Hi everyone…

How to write error in yii2. Without any attributes that is related to Model class or ActiveRecord… Normal error based on business logic that are not associated with database tables… In simple without using addError() method… Is there is any other method or class to show users custom error… How to implement it…

Can you give an example?

[color=#C9C9C9]galaxy tab 4 8.0 schutzhülle[/color]


if the user is blocked… so we check the status in database and if status is blocked i need to add error… User is blocked