"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-08 20:18:40.060080
"""

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

class FallbackExecutor:
    """
    A class for executing a function with fallback capabilities.
    
    This class allows defining primary and secondary functions that can be executed in case of failure
    or when the primary function does not meet certain conditions. The fallback function is only invoked
    if an error occurs during the execution of the primary function.

    :param primary_func: Callable to execute as the main task.
    :param fallback_func: Optional Callable to execute as a backup.
    """

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

    def run(self) -> Any:
        """
        Execute the primary function and handle errors by invoking the fallback function if provided.
        
        :return: The result of the executed function or the fallback function, if it was invoked.
        """
        try:
            return self.primary_func()
        except Exception as e:
            if self.fallback_func is not None:
                print(f"Primary function failed with error: {e}. Running fallback function.")
                return self.fallback_func()
            else:
                raise

# Example usage
def primary_task() -> str:
    """Divide by zero intentionally to trigger an exception."""
    return 1 / 0

def secondary_task() -> str:
    """Return a default message if the primary task fails."""
    return "Default message"

executor = FallbackExecutor(primary_task, secondary_task)

try:
    result = executor.run()
except Exception as e:
    print(f"An unexpected error occurred: {e}")
else:
    print(f"Result: {result}")

# Expected output:
# Primary function failed with error: division by zero. Running fallback function.
# Result: Default message
```