iOS Question LastException error

ilan

Expert
Licensed User
Longtime User
hi

i will need to explain a little about my problem so sorry for the long text :)

i have some difficulties with one of my b4i apps (that is a little bit complex)
i got a lot crash reports in my analytics console (members center)
it is not simple to get information about those crashes in ios and also what i get is only
the sub where the crash happened but i dont get any crash reason
so i implemented with firebase notifications a system where the app sends (in real time) a notification
with the LastException.message to my android device.

i put in all subs where a crash happened (according to ios analytics crash logs) a try...catch and when a crash happened the app send the noti to my phone.

in the 2 last days i received about 20 crash reports like this and i was able to fix those bugs since i had a much more detailed information what caused that crash.

so i was thinking, ok now i will receive for all those subs a crash report but what will happen if a crash will fired in a different sub? i cannot put in all subs try.. catch!

so i decided to put when the app goes to background an if statement

if LastException.IsInitialized then ... (send noti with LastException.message)

i understand that i could get like this 2 times the same noti but if a crash happens in a different sub where there is no try ... catch i should get a noti too, right?

how does LastException works? will it be initialized only if a crash happens?

i am asking because i get a weird LastException.message sent to my phone as a noti.

Screenshot_2016-09-22-07-32-05.png


what could be the reason for that error msg?

could it be the LastException will be created also when there is no crash and thatswhy i get that message?

thanx, ilan
 

ilan

Expert
Licensed User
Longtime User
It is possible. Based on the error message it is hard to say where does it come from.

should i ignore it? where could i look for that error? maybe i should look in the logs on debug mode for that lastexception when app goes to background?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
ok so what you are saying is that my idea was wrong. when i put in application_background: if LastException.IsInitialized then ... this will not work because on a crash that event wont be reached.

ok thanx @Erel i will remove that line from activity_background
 
Upvote 0
Top