mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
build scripts: log exception caused an error if any
This commit is contained in:
@@ -151,6 +151,8 @@ interface BuildMessages {
|
||||
*/
|
||||
void error(String message)
|
||||
|
||||
void error(String message, Throwable cause)
|
||||
|
||||
void progress(String message)
|
||||
public <V> V block(String blockName, Closure<V> body)
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class AntTaskLogger implements BuildListener {
|
||||
BuildMessages handler = threadHandlers[Thread.currentThread()] ?: taskHandlers[event.task?.runtimeConfigurableWrapper] ?: defaultHandler
|
||||
switch (event.priority) {
|
||||
case Project.MSG_ERR:
|
||||
handler.error(message)
|
||||
handler.error(message, event.exception)
|
||||
break
|
||||
case Project.MSG_WARN:
|
||||
handler.warning(message)
|
||||
|
||||
@@ -92,6 +92,11 @@ class BuildMessagesImpl implements BuildMessages {
|
||||
throw new BuildException(message)
|
||||
}
|
||||
|
||||
@Override
|
||||
void error(String message, Throwable cause) {
|
||||
throw new BuildException(message, cause)
|
||||
}
|
||||
|
||||
@Override
|
||||
void progress(String message) {
|
||||
if (parentInstance != null) {
|
||||
|
||||
Reference in New Issue
Block a user