I understand how you can use :error and $error and /reseterror to handle errors created by an alias, but...

How do I create a custom error with a custom message IN an alias which will trigger the above in whatever alias called my alias?