In the custom control you can check if the folder/view you are going to work with is correct. Aka has the correct design. This can be done in the beforepageload event. When the design check reports an error it should be written to a log file and a 'nice' message should be displayed to the user.
The error logging could be done with the various logging projects on openntf like xlogger
When your code reports an error you can than set a scoped value called 'displayRepeat' to false. The repeat control ( and other controls ) should be rendered according to this displayRepeat value.
To display the nice error message to the user. Place a errors control on the top of your control and add the following code:
facesContext.addMessage( null,
new javax.faces.application.FacesMessage( "your error message" ) );