openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Logemann>
Subject Re: MetaModel creation with -Aopenjpa.generate=true
Date Wed, 23 Mar 2011 15:00:02 GMT
one more thing. 

You have something like this in the second process() method:

private boolean process(TypeElement e) {
catch (Exception e1) {
            logger.error(_loc.get("mmg-process-error", e.getQualifiedName()), e1);
            return false;
        } finally {

This is cool if get an error in the real process but this one here:

public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
        if (active && !roundEnv.processingOver()) {
            Set<? extends Element> elements = roundEnv.getRootElements();
            for (Element e : elements) {
                process((TypeElement) e);

is the caller and we dont have any logging here if the cast fails. This leaves a user in a
unpleasant situation when something goes wrong on that line (as it is with my situation).
As every java developer know "a cast can fail" and i would like to see a logging for that
to and a re-throw after that.

Marc Logemann

Am 23.03.2011 um 15:51 schrieb Rick Curtis:

> Marc -
> Can you narrow down the Entity which is having the problem so we can write a
> unit test?
> Thanks,
> Rick

View raw message