Is there a global error event handler?

Avatar

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
user39159662
Level 1

08-10-2016

Hi,

Is there in LiveCycle Designer an event which is similar to the window.onerror​ event handler?

That is, an event which is fired in case of unhandled exceptions.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

11-10-2016

Here is a sample from Adobe Blogs Handling JavaScript Exceptions

Hope this help

Answers (5)

Answers (5)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

12-10-2016

Hi, Just thought it might worth pointing out that you could write a macro to add the try/catch block to your code.  There is an example of a macro that adds enter/exit console.println statements in the same blog Add Trace to Form Script  which I've found useful in working out whats going in at times.

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

10-10-2016

Hi

I don't believe there is such a thing in a LiveCycle Designer form.

Maybe if you can explain the scenario more we could suggest an alternative.

Regards

Bruce

Avatar

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
user39159662
Level 1

13-10-2016

At the moment I think I prefer to add the try/catch blocks manually, but this may change.

Thank you for the article, it's quite useful indeed.

Avatar

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
user39159662
Level 1

12-10-2016

Thank you to both of you!

I have my answers now.

There is no global error handler, but I can nevertheless wrap most of the code in a "global" try / catch ("catch them all"), which is fine for me.

Avatar

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
user39159662
Level 1

Like

1 like

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
user39159662
Level 1

11-10-2016

Hi Bruce,

I don't have a specific scenario in mind.

Though, I am investigating the error logging and error reporting possibilities within LiveCycle Designer forms.

For example, if there is an unhandled error in the code, I am curious if I can "catch" it globally, inform the user ("Something is wrong with this form, please contact support") and possibly log the error in a file.