Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
calin
Newbie

Global error logging to a api

Jump to solution

Hi,

I am new to channel development, in my current app I want to log all exceptions to the server.


I know that the language has support for try / catch but I can figure out if there a way to observer thrown exceptions and just log them before the app dies?

 

0 Kudos
1 Solution

Accepted Solutions
sjb64
Roku Guru

Re: Global error logging to a api

Jump to solution

You have no way to know the app is dying, and even if you could detect it, there is no allowance for an any clean up code on an app end in Brightscript.  There has been previous discussions and requests about detecting an app end and allowing some minimal time for clean up, but this isn't there and the reasoning from Roku (which makes sense) makes me think it is absolutely not going to happen.

Try/catch is currently your only option to my knowledge, and even it wont detect a reboot level error (a memory overflow for example), or the home button.

View solution in original post

1 REPLY 1
sjb64
Roku Guru

Re: Global error logging to a api

Jump to solution

You have no way to know the app is dying, and even if you could detect it, there is no allowance for an any clean up code on an app end in Brightscript.  There has been previous discussions and requests about detecting an app end and allowing some minimal time for clean up, but this isn't there and the reasoning from Roku (which makes sense) makes me think it is absolutely not going to happen.

Try/catch is currently your only option to my knowledge, and even it wont detect a reboot level error (a memory overflow for example), or the home button.

Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.