throw instead of exit()