"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-06 07:57:24.626938
"""

```python
from typing import Callable, Any, Optional


class FallbackExecutor:
    """
    A class for executing a function with fallback handling.
    
    The FallbackExecutor provides an execution context where if the main 
    function fails due to an exception, a fallback function can be used. This is particularly useful in scenarios where limited error recovery is necessary.
    
    :param func: Main function to execute
    :type func: Callable[..., Any]
    :param fallback_func: Fallback function to use in case of failure
    :type fallback_func: Callable[..., Any] or None
    """

    def __init__(self, func: Callable[..., Any], fallback_func: Optional[Callable[..., Any]] = None):
        self.func = func
        self.fallback_func = fallback_func

    def execute(self) -> Any:
        """
        Execute the main function and handle exceptions by invoking the fallback if provided.
        
        :return: Result of the main or fallback function execution, or None if both fail.
        :rtype: Any
        """
        try:
            return self.func()
        except Exception as e:
            print(f"Error occurred during execution: {e}")
            if self.fallback_func is not None:
                return self.fallback_func()
            else:
                print("No fallback function provided.")
                return None


# Example usage
def main_function():
    # Simulate a failure scenario
    raise ValueError("Main function failed")

def fallback_function():
    return "Executing fallback function"

executor = FallbackExecutor(main_function, fallback_function)
result = executor.execute()
print(result)  # Should print: Executing fallback function

fallback_only_executor = FallbackExecutor(main_function)
result = fallback_only_executor.execute()
print(result)  # Should print: No fallback function provided.
```