only shutdown all layers if exception was caught