【发布时间】:2012-09-24 16:52:05
【问题描述】:
您好,我正在使用 Netbeans 平台进行开发和应用,但我无法捕捉到此异常:
org.hibernate.exception.ConstraintViolationException
我使用以下行:
try {
il.delete(lote);
}
catch (HibernateException he) {
NotifyDescriptor error = new NotifyDescriptor.Message(ERROR+he.getMessage(), NotifyDescriptor.ERROR_MESSAGE);
DialogDisplayer.getDefault().notify(error);
}
我的界面可能会抛出这个异常,这个异常可以在TopComponent中被捕获。问题是我收到了两次,一次是我的通知,另一次来自平台。 我该如何解决这个问题?
【问题讨论】:
标签: java hibernate netbeans platform