Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.ts #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update index.ts #72

wants to merge 2 commits into from

Conversation

bombjackit
Copy link
Contributor

@bombjackit bombjackit commented Nov 27, 2024

Description, Motivation, and Context

In _getAllTemplates changed try catch with .catch on first call to template.getTemplate, because template.getTemplate is a promise, with externally try catch the error is not catched.

If you use this node in node-red (for example using node-red-contrib-cip-st-ethernet-ip), node-red crash with Uncaught Exception

How Has This Been Tested?

I try this commit with my test environment (I have some rockwell plc that I read from like 1756-L82ES and 1756-L81ES)

  • Node.js 18.19.0
  • Node-red 3.1.3
  • Windows 11 x64
  • node-red-contrib-cip-st-ethernet-ip 2.0.2

This commit works in case of #21 : I think that try catch is inserted to resolve this issue.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This is a work in progress, and I want some feedback (If yes, please mark it in the title -> e.g. [WIP] Some awesome PR title)

Related Issue

Major issue is Uncaught Exception on node-red

In _getAllTemplates change try catch with .catch on first call to template.getTemplate, because template.getTemplate is a promise, with externally try catch the error is not catched.

If you use this node in node-red (for example using node-red-contrib-cip-st-ethernet-ip), node-red crash with Uncaught Exception
Small change to commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant