Jump to content
Server Maintenance This Week. ×

Custom message for 'file damaged' state?


This topic is 4320 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I deploy runtime solutions to my customers who have no idea what to do if they encounter a 'file damaged' condition with the instruction to use 'file recovery'.

What I would like to do is trap the condition and provide a custom instruction.

Now they call paniced, I give them the simple instruction, and life is good in a few minutes.

Can I trap and provide the message when the runtime encounters 'file damaged'?

Link to comment
Share on other sites

It's a bit hard because the message will be generated from INSIDE the file, and FMP is telling the user that the file cannot be opened.

Link to comment
Share on other sites

It would be great if there were a file option to specify your own message to be displayed when FM can't open the file!

Link to comment
Share on other sites

It's a bit more complex than it looks: the file needs to phone-ahead to the FMP application and say "You're about to open my file, here is the message you should display if you cannot open it because it's damaged."

To do this, use an "opener" file that opens the real file. In the script in the opener file trap for the file damaged error and issue your warning if the file cannot be opened.

Just in case the opener file ever gets damaged, use another opener file to open the opener file to open the real file.

Rinse and repeat.

Link to comment
Share on other sites

I should have thought of that!

Already use an 'opener' file. Just need to capture the error. I'll risk that the opener file doesn't get damaged! It never has in 8 years - so far.

Thanks!

Link to comment
Share on other sites

  • 2 months later...

This topic is 4320 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.