ObjectNotFoundException is a subclass of FinderException. You can
catch either:
try {
find(...)
} catch (FinderException fe) {
// something went wrong
}
or
try {
find(...)
} catch (ObjectNotFoundException onfe) {
// could not find object - do something clever, like
I should just add, that the exception handler you show below should
work OK.
--
Danny Yates
-Original Message-
From: Jon Haugsand [mailto:[EMAIL PROTECTED]
Sent: 06 June 2003 15:42
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Bug in 3.2.1?
Look at this fragment. The call
Hi,
Look at this fragment. The call 'findAktivtByIsin' is a finder in
another bean and it fails (just check the stacktrace). However, it
fails with ObjectNotFoundException: No such entity. Why is that?
If it does not exist, shouldn't it fail with FinderException?
ObjectNotFoundException
ObjectNotFoundException is a subclass
of FinderException.
NoSuchObjectExsists is what gets throw
if you reference an actual bean interface method on an Entity that's beed
removed.
Dave
Jon Haugsand [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
06/06/2003 10:41 AM
Please respond to