use catch/throw instead of return to reduce cl dependency