Added more exception handling to AnnotationResourceOption.php.