Any ideas how to prevent error when trying dynamically access label which doesn't exist? Check somehow whether it exists before referencing or maybe catch this error.
Here is my page:
<apex:page Controller="MyController">
<apex:outputText> {!$Label[label.labelName]} </apex:outputText>
</apex:page>
And here is error:
Field $Label.myLabel does not exist. Check spelling
Error is in expression '{!$Label[label.labelName]}' in component <apex:repeat> in page pagename
Error evaluating dynamic reference 'myLabel'
Related topic: possible to access custom labels dynamically?