BF [ 2104021 ] CalloutEngine returns null if the exception has null message

This commit is contained in:
teo_sarca 2008-09-10 16:45:48 +00:00
parent 8a010f9b52
commit 1e329d3c76
1 changed files with 15 additions and 7 deletions

View File

@ -16,18 +16,23 @@
*****************************************************************************/ *****************************************************************************/
package org.compiere.model; package org.compiere.model;
import java.lang.reflect.*; import java.lang.reflect.Method;
import java.math.*; import java.math.BigDecimal;
import java.sql.*; import java.sql.Timestamp;
import java.util.*; import java.util.Properties;
import java.util.logging.*; import java.util.logging.Level;
import org.compiere.util.*;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
/** /**
* Callout Engine. * Callout Engine.
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: CalloutEngine.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $ * @version $Id: CalloutEngine.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>BF [ 2104021 ] CalloutEngine returns null if the exception has null message
*/ */
public class CalloutEngine implements Callout public class CalloutEngine implements Callout
{ {
@ -108,8 +113,11 @@ public class CalloutEngine implements Callout
if (ex == null) if (ex == null)
ex = e; ex = e;
log.log(Level.SEVERE, "start: " + methodName, ex); log.log(Level.SEVERE, "start: " + methodName, ex);
ex.printStackTrace(System.err);
retValue = ex.getLocalizedMessage(); retValue = ex.getLocalizedMessage();
if (retValue == null)
{
retValue = ex.toString();
}
} }
finally finally
{ {