Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Form Calc error Handling:

Avatar

Former Community Member

Hi,

Is there any way to implement error handling into a formcalc function?   I'm using a Get function to call a file from a web server... It works if there is an internet connection but returns a formcalc error if no connection is available.

I would rather return a more discriptive message to the user if no connection is available. I can't seem to find any error handling in any formcalc documentation.   I'm just looking for a simple if/then statement to address this.

This was asked earlier too. But, the suggested resolution was not convincing.

Any help is highly appreciated.

1 Reply

Avatar

Level 10

Hi,

as FormCalc doen't have something like a try - catch expression in JavaScript, and the Get() method has no return value if it fails you won't be able to replace the default exception message I'm afraid.