• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Vu96 · Feb 17 at 11:45 AM · exceptioncrashreportjni

Passing System.Exception to JNI

Hello.

So i've implemented Firebase crashlytics in Unity, made a plugin and a c# wrapper for the java class and everything works fine except one thing.

 public static void logException(Exception ex)
     {
         Crashlytics.logException(ex);
     }

This is the java method that sends the exception to crashlytics services. However, when i try to pass an Exception through JNI to call this static method it throws this :

Exception on emulator

So my question would be, is there a way to pass System.Exception through JNI or convert it to java.Throwable somehow? Thanks!

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image zereda-games · Feb 17 at 01:03 PM 0
Share

whats in your block of code in

 "Crashlytics.logException(ex);"
avatar image Vu96 · Feb 17 at 01:07 PM 0
Share

@zereda-games It's Firebase's Crashlytics method. I can try to decompile and check what's inside but i don't think it would help much as it expects the Exception(Throwable) by design.

avatar image Vu96 · Feb 18 at 08:31 AM 0
Share

@zereda-games Any ideas on this? Or should i try to do it differently

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

102 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

[performance][JNI] Game throws JNI exception every frame 1 Answer

How does UnityEngine.AndroidJNISafe work? Is there some Reference? 1 Answer

Using List.Count on Unity iPhone 2 Answers

What could be causing this problem reading from a Rect into a Vector2? 3 Answers

UnityEditor.TextEditor.DrawCursor - MIssing Method Exception -2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges