Raygun not sending exception manually if using a throw exception statement after it .
akshay
Posted on
Jul 08 2015
I am using a try catch block in Android(The application class which gets executed before main activity)and in catch block i am sending exception manually and after that i am using a throw statement so that user does not continue to use the app with a broken code. But the problem i am facing is raygun do not send error when i use throw statement. But do send error if i do not use throw statement.
Any help will be appreciated.
Thanks.
Callum
Posted on
Jul 09 2015
Have you added the RaygunPostService as a service element beneath application in your AndroidManifest.xml? The block should look like this, alongside your API key reference:
<service android:name="main.java.com.mindscapehq.android.raygun4android.RaygunPostService"
android:exported="false"
android:process=":raygunpostservice"/>
<meta-data android:name="com.mindscapehq.android.raygun4android.apikey"
android:value="PASTE_YOUR_API_KEY_HERE" />
It would be useful to see if the RaygunPostService service is running at the time when the exception is re-thrown. You can note this by setting a breakpoint at the line with the throw statement, and inspecting the running threads in your IDE. Let us know what you find here.
Also assuming that this action is happening on the main UI thread, correct? If you could also let us know what Android SDK version you're seeing this behaviour under that would be useful.