"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-06 10:43:13.019805
"""

```python
class FallbackExecutor:
    """
    A class that provides a fallback mechanism for executing tasks.
    
    This class allows you to run a primary task and in case of an exception,
    it will attempt to execute a backup task or raise the original error.

    :param primary_task: Callable object representing the main task
    :param backup_task: Optional callable object representing a backup plan
    """

    def __init__(self, primary_task: callable, backup_task: callable = None):
        self.primary_task = primary_task
        self.backup_task = backup_task

    def execute(self) -> any:
        """
        Execute the main task. If an exception occurs during execution,
        try to run the backup task if provided.

        :return: The result of the executed task.
        :raises: Original exception if no backup task is provided or it fails.
        """
        try:
            return self.primary_task()
        except Exception as e:
            if self.backup_task:
                try:
                    return self.backup_task()
                except Exception as backup_exception:
                    raise e from backup_exception

# Example usage:

def main_task():
    """Main task that may fail."""
    result = 1 / 0  # Intentionally raising a ZeroDivisionError
    return result

def backup_task():
    """Backup task that runs when the primary task fails."""
    print("Executing backup plan")
    return "Falling back to this"

executor = FallbackExecutor(main_task, backup_task)
try:
    executor.execute()
except ZeroDivisionError as e:
    print(f"Primary task failed: {e}")
```