While working on an expanding project of mine, I ran into a error that caused my program to crash. As usual, I started…