How to handle the Android Application crashes and force close's with python

if i am running any test script on any app there are chances that app gets crashed or force close occurs, Is there any way to handle those and capture adb logs. Btw im working on Appium python