Capturing and restorating continuations, catching errors