ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45228] more specific Error Starting Modern Compiler message
Date Mon, 30 Jun 2008 22:03:01 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45228





--- Comment #2 from Larry Heidt <larry.heidt@hksystems.com>  2008-06-30 15:03:00 PST
---
suggest adding something like the "log" method and call below to the Javac13
class to reveal problems like the OutOfMemoryError above:

            log(ex);   //*** NEW
            throw new BuildException("Error starting modern compiler",
                                     ex, location);
        }
    }
}

/**
 * Log the specified Throwable.  
 * @param t the Throwable to log.
 */
private void log(Throwable t) {  
    if (getProject() == null) {  
        t.printStackTrace();
    } else { 
        StringWriter sw = new StringWriter();
        PrintWriter w = new PrintWriter(sw);
        t.printStackTrace(w);
        w.close();
        getProject().log(sw.toString(), Project.MSG_ERR);
    }
}


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message