IDEMPIERE-6260 Posting error not creating Notice (#2489)
Fix unit test error
This commit is contained in:
parent
d89f8b9801
commit
9158a638f4
|
@ -30,6 +30,7 @@ import java.util.Iterator;
|
|||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.exceptions.DBException;
|
||||
import org.compiere.model.I_C_AllocationHdr;
|
||||
import org.compiere.model.I_C_Cash;
|
||||
|
@ -684,7 +685,15 @@ public abstract class Doc
|
|||
.append(" - " + Msg.getElement(Env.getCtx(),"IsBalanced") + "=").append( Msg.getMsg(Env.getCtx(), String.valueOf(isBalanced())))
|
||||
.append(" - " + Msg.getElement(Env.getCtx(),"C_AcctSchema_ID") + "=").append(m_as.getName());
|
||||
note.setTextMsg(Text.toString());
|
||||
note.saveEx();
|
||||
try {
|
||||
note.saveEx();
|
||||
} catch (AdempiereException e) {
|
||||
if (e.getMessage() != null && e.getMessage().startsWith("Foreign ID " + p_po.get_ID() + " not found in ")) {
|
||||
; //ignore, in unit test
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
p_Error = Text.toString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue