doc: update example, use Traceback.format()