From 80192e47b8a21251841bd6685b1eeb668973d0a5 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 17 Sep 2008 21:04:34 +0000 Subject: [PATCH] Fix [ 2116815 ] Some documents don't post silently --- client/src/org/compiere/apps/AEnv.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/client/src/org/compiere/apps/AEnv.java b/client/src/org/compiere/apps/AEnv.java index 0375e7579c..7b6a61b02e 100644 --- a/client/src/org/compiere/apps/AEnv.java +++ b/client/src/org/compiere/apps/AEnv.java @@ -1,5 +1,5 @@ /****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * + * Product: Adempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * @@ -28,6 +28,7 @@ import java.awt.Window; import java.awt.event.ActionListener; import java.io.InvalidClassException; import java.io.NotSerializableException; +import java.lang.reflect.UndeclaredThrowableException; import java.rmi.RemoteException; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -985,12 +986,24 @@ public final class AEnv { log.log(Level.WARNING, "(RE)", e); error = e.getMessage(); + if (error == null) + error = "Exception: " + e.toString(); + s_server = null; + } + catch (UndeclaredThrowableException e) + { + log.log(Level.WARNING, "ex", e); + error = e.getCause().toString(); + if (error == null) + error = "Exception: " + e.toString(); s_server = null; } catch (Exception e) { log.log(Level.WARNING, "ex", e); error = e.getMessage(); + if (error == null) + error = "Exception: " + e.toString(); s_server = null; } }