From d770e133919cf7f97686bc075d4ddfbbf517caf0 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 14 May 2010 16:49:54 +0200 Subject: [PATCH] fix linphonecoreexception --- java/common/org/linphone/core/LinphoneCore.java | 3 ++- java/j2me/org/linphone/core/LinphoneCoreException.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 927c9596e..e02b19351 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -130,8 +130,9 @@ public interface LinphoneCore { * {@link LinphoneCoreListener#inviteReceived(LinphoneCore, String)} listener. * The application can later respond positively to the call using * this method. + * @throws LinphoneCoreException */ - public void acceptCall(); + public void acceptCall() throws LinphoneCoreException; /** diff --git a/java/j2me/org/linphone/core/LinphoneCoreException.java b/java/j2me/org/linphone/core/LinphoneCoreException.java index 105224ee4..9ebb98fad 100644 --- a/java/j2me/org/linphone/core/LinphoneCoreException.java +++ b/java/j2me/org/linphone/core/LinphoneCoreException.java @@ -30,6 +30,7 @@ public class LinphoneCoreException extends Exception { } public LinphoneCoreException(Throwable e) { + this(e.getClass().getName()+" "+ e.getMessage()); mE = e; } @@ -40,7 +41,7 @@ public class LinphoneCoreException extends Exception { public void printStackTrace() { super.printStackTrace(); - mE.printStackTrace(); + if (mE!=null) mE.printStackTrace(); }