exception to stop the app


I have an user action, AND i WOULD like to throw an exception to stop in such action without advancing after the user action detects the change. In this case I would like to detect the absence of a file, I have used the nullbinary() and it works, but I would like to add an exception whenever detects there is no file to upload and stop any logic ahead. Otherwise it will only end this user action and keeping the rest of the logic flow, but I want to stop here in this user action whenever there is no file. How to achieve it? 


ok. i solved it. I have used the user exception and it works.