adding option to reraise exception