I got an error dialog box today I've never seen before...

This occurred when I was trying to use the SourceRectAtTime from a text layer to define the path of a shape. You can see the expression that caused the crash. I'm a beginner with expressions so probably I should go watch some tutorials to learn the correct way to do this.
But still... this project is now un-openable, it crashes before loading the timeline. (I'll need to use a previously saved version from 20 minutes ago and redo a bit of work). I'm surprised that instead of just throwing me a little caution symbol next to the expression and disabling it, that I crashed and corrupted the entire project. That doesn't seem right to me...?