exception handling around no active doc