linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] liblinphone java exeception handling in call b


From: Margaux Clerc
Subject: Re: [Linphone-developers] liblinphone java exeception handling in call backs
Date: Tue, 16 Jun 2015 15:20:58 +0200

Hi Ben,

Thanks , your patches are in Linphone master now.
Best regards,


Le 12 juin 2015 à 23:12, Ben Sartor <address@hidden> a écrit :

Hi,

I have just rebased my patches to the current master.

Kind regards,
Ben Sartor

Hi,

I'm having trouble seeing java exceptions in the log file when they are
thrown in a linphone callback. This code snippet should help, to explain
what I mean:

@Override
public void callState(LinphoneCore lc, LinphoneCall call,
                     LinphoneCall.State state, String message)
{
   final LinphoneCallStats stats = call.getAudioStats();
   Log.i("bandwidth: down=", stats.getDownloadBandwidth(),
         " up=", stats.getUploadBandwidth());
   // ...
}

If getAudioStats() returns null, a NullPointerException will be thrown and
the execution aborts. If you have liblinphone's debug logging enabled, you
will see s.th. like this in your log:

E DEBUG   : Listener 0x100c6e raised an exception

Without having liblinphone's debug logging enabled, nothing is logged. Which
makes it hard to debug for android developers.

Attached are some patches which add a java backtrace of the exception to the
log even if liblinphones debug logging is not enabled.

What do think? Would it be possible to merge the patches?

Kind regards,
Ben Sartor

-- 
———————————————————
https://www.simlar.org
free and secure calls

fon: +49-(0)221-999 999 30
fax: +49-(0)221-999 999 31                                   
mail: address@hidden

github: https://github.com/simlar/
———————————————————<0001-unified-java-exception-handling-in-callbacks.patch><0002-fixed-crash-when-java-sets-log-handler-and-an-except.patch><0003-java-exception-handling-in-callbacks-now-logs-backtr.patch>_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]