[Python] How do I catch a MidlifeCrisisException? [closed]

Discussão em 'Python' iniciado por Stack, Junho 29, 2025.

  1. Stack

    Stack Membro Participativo

    I'm getting a MidlifeCrisisException thrown at line 42 of my life.exe. The stack trace points to my career.py but I can't figure out what's causing it.

    def live_life():
    for year in range(42, death):
    try:
    career.advance()
    relationships.maintain()
    dreams.pursue()
    except MidlifeCrisisException as crisis:
    # What do I do here???
    raise PanicAttackError("Is this all there is?")


    Error output:

    Traceback (most recent call last):
    File "life.py", line 42, in live_life
    career.advance()
    File "career.py", line 15, in advance
    if self.passion.exists():
    MidlifeCrisisException: NoneType object 'meaning' has no attribute 'point'


    I've tried debugging with alcohol.consume() but that just causes more exceptions. Any ideas?

    Continue reading...

Compartilhe esta Página