From 6790fa1570c0ce8b67b788692b32396dec907dbb Mon Sep 17 00:00:00 2001 From: jan thielemann Date: Wed, 16 Jul 2014 12:33:12 -0500 Subject: [PATCH] IDEMPIERE-1985 Provide error message in unsuccessful processes / fix NPE --- org.adempiere.base/src/org/adempiere/util/ProcessUtil.java | 2 +- org.adempiere.base/src/org/compiere/process/SvrProcess.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java index 2da83f4d2c..180d3544f5 100644 --- a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java @@ -269,7 +269,7 @@ public final class ProcessUtil { msg = engine.eval(rule.getScript()).toString(); //transaction should rollback if there are error in process - if (msg.startsWith("@Error@")) + if (msg != null && msg.startsWith("@Error@")) success = false; // Parse Variables diff --git a/org.adempiere.base/src/org/compiere/process/SvrProcess.java b/org.adempiere.base/src/org/compiere/process/SvrProcess.java index 2c9c00dffb..67ca51f844 100644 --- a/org.adempiere.base/src/org/compiere/process/SvrProcess.java +++ b/org.adempiere.base/src/org/compiere/process/SvrProcess.java @@ -211,7 +211,7 @@ public abstract class SvrProcess implements ProcessCall } //transaction should rollback if there are error in process - if(msg.startsWith("@Error@")) + if(msg != null && msg.startsWith("@Error@")) success = false; if (success)