Intense Lungs hurting

This maybe a dumb question but should I stop working out if my lungs are hurting. It was a 30 minute workout and I had to quit at 7mins and 55seconds. I had planned on doing the full 30. I hadn’t worked out in a long time. I knew I needed to get back into it. There just was other priorities. I went ahead and started today.