Skip to content

Update index.ts#72

Open
bombjackit wants to merge 2 commits intoSerafinTech:masterfrom
bombjackit:patch-2
Open

Update index.ts#72
bombjackit wants to merge 2 commits intoSerafinTech:masterfrom
bombjackit:patch-2

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