Skip to main content
Participating Frequently
June 25, 2015
Question

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

  • June 25, 2015
  • 1 reply
  • 348 views

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 has been closed for replies.

1 reply

Graeme Bull
Community Expert
Community Expert
June 26, 2015

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.