openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi P Palacherla (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1535) Inconsistency in exceptions thrown from MetaDataRepository.resolve()
Date Wed, 24 Feb 2010 21:35:27 GMT
Inconsistency in exceptions thrown from MetaDataRepository.resolve()
--------------------------------------------------------------------

                 Key: OPENJPA-1535
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1535
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 2.0.0-beta, 1.1.0
            Reporter: Ravi P Palacherla
            Assignee: Ravi P Palacherla


There is an inconsistency in the way exceptions are thrown from MetaDataRepository.resolve(ClassMetaData).
If there are more than one error encountered while resolving metadata then all these exceptions
are wrapped inside MetaDataException 
and the MetaDataException is thrown. If there is only single exception thrown then that exception
is thrown without wrapping inside MetaDataException.

So, in case of single error encountered any exception ( need not be MetaDataException) is
thrown 
but in case of multiple errors encountered MetaDataException is thrown.

Now, there is a method loadRegisteredClassMetaData() inside same class which calls the above
resolve method ( via other method calls).
This loadRegisteredClassMetaData() catches MetaDataException and logs a warning, which is
an expected behavior.
But as resolve(), in case of a single error , throws an exception other than MetaDataException
loadRegisteredClassMetaData() is not
able to catch this Exception.

I think this inconsistence behavior has to be fixed inside MetaDataRepository.resolve().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message