exception的用法和短语

“exception”指“例外、除外”,和规则、程序、合同条款以及编程中的错误处理都有关。它常用来表示某种情况不适用一般规定,或在代码运行中出现了需要单独处理的异常。
基本含义与常见用法
作名词时,exception 常表示“例外”。常见短语有 make an exception(破例)、with the exception of(除……之外)、without exception(无一例外)、take exception to(对……表示反对)。在编程中,exception 指程序运行时的异常,常见搭配是 throw an exception(抛出异常)、catch an exception(捕获异常)、handle an exception(处理异常)。合同或规则文本里也常说 exception clause(例外条款)。
常见问题
学习者常混淆 exception 和 except:except 是介词或连词,表示“除……之外”;exception 是名词,表示“例外”。另一个问题是搭配,比如“对某规则破例”应说 make an exception to the rule,而不是 make exception。“无一例外”是 without exception,不加冠词。编程语境中,catch 后面接的是异常对象,不是“错误”这个词本身,表达要区分 error 和 exception。
怎么判断和怎么选
如果句子里需要名词,用 exception;需要表示“除了”的介词,用 except。看搭配也能判断:出现 make、with、without、take 等词时,多与名词 exception 搭配。写作时先确定是“规则例外”还是“程序异常”:前者多用 make an exception、with the exception of;后者多用 throw、catch、handle an exception。日常表达中,想礼貌地表示“这次特殊处理”,可用 make an exception;想强调“全部包括”,用 without exception。