Skip to main content
Participating Frequently
Jun 25, 2015 7:26 AM UTC
Question

How can I catch in AMS code errors like "Failed to open shared object file (file.tmp) for write."

Hello,

I can see error "Failed to open shared object file (file.tmp) for write." in my application logs. I want notify user if such error happen. So I need to listen for the error in code. I tried:

1. application.onStatus - didn't help

2. SharedObject.onStatus - didn't help either

Any other things to try?

Thanks,

Stan

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Graeme Bull
Community Expert
Community Expert
Jun 26, 2015 6:35 PM UTC

I don't believe there is a way to catch the error, but you can likely check to see if the value is null after trying to get the Shared Object. As you're making a persistent one, perhaps also check to see if there is a value in there? If not, then you know you don't have it. If it's a brand new SO that you're creating and getting an error in the logs but not your code, perhaps check the version? It may return null as it couldn't be created.

Translate