Upload in a separate task, how to handle exception ?


To be able to display an animated image during the upload of a file, I launch the upload in a specific Task. This works fine, unless the upload encounters a problem, such as a network failure. No exception is trapped, except that an error message is displayed but as it is in another task, we do not see it and suddenly we wait indefinitely for the end of the procedure.

How to catch runtime errors effectively? I tried the try..except on the upload without success ...


Unfortunately this is a technical limitation of the TMS FMX Cloud Pack.

You might want to look into using TMS FNC Cloud Pack where requests are handled asynchronously. There is a fully functional trial version available at:

Are you telling me to buy another component and also to rewrite my application?

The functionality which you are trying to achieve might not be possible with TMS FMX Cloud Pack.
If the problem persists, please provide a ready to run sample project that demonstrates the issue so I can further investigate this.

Please also provide the following information:

  • The version of Delphi you are using
  • On which platform(s) does the issue occur? (Windows, Android, iOS and/or Mac)
    Please also state the version of Android and/or iOS you are using if applicable.