OfficeDev / Office-365-SDK-for-Android

Microsoft Services SDKs for Android produced by MS Open Tech.
https://dev.office.com/android
Other
224 stars 74 forks source link

Implement serializable in exceptions #91

Closed ricalo closed 9 years ago

ricalo commented 9 years ago

Hi,

I've been working with Visual Studio Application Insights and I find difficult to pass exceptions data to Application Insights. The reason is because the Office 365 SDK exceptions don't implement Serializable, which is required to use the exception with the Application Insights SDK for Android. Would you consider implementing Serializable in your exceptions?

marcote commented 9 years ago

Yes, of course. The code is frozen for 1.0.0 now, but it will be included in our next release, next week if everything goes fine.

ricalo commented 9 years ago

Awesome. Thank you, @marcote!

marcote commented 9 years ago

@Ricalo one question. All exceptions in Java implements Serializable, and our OrcException extends java.lang.Exception. It's already serializable. Am I missing something?

ricalo commented 9 years ago

Hi, @marcote. Sorry for the late response,I took some days off work. I'm working with Office 365 SDK v0.13.0 and Application Insights v1.0-beta.5. The Application Insights SDK chokes when trying to send the exception information by using

TelemetryClient.getInstance().trackHandledException(Office365Exception);

with error java.io.NotSerializableException. If I send a raw java.lang.Exception it works fine. However, I haven't updated to newer versions of the Office 365 SDK so I haven't tried sending the OrcException. That might solve the problem.

marcote commented 9 years ago

Ricalo, please re-open the issue if you still have problems.