Skip to content

There's no error handling #32

@kazuhitoyokoi

Description

@kazuhitoyokoi

What are the steps to reproduce?

  1. Prepare JavaScript file of function node which node generator will encounter an error.
> vi samples/lower-case.js (Change "lower-case" to "function")
// name: function
// outputs: 1
msg.payload = msg.payload.toLowerCase();
return msg;
  1. Run node generator command to create node.

What happens?

Node generator shows not only an error message but also a success message.

> node-red-nodegen samples/lower-case.js
'function' is duplicated node name. Use another name.
Success: undefined

What do you expect to happen?

Node generator should show only the error message. To solve the problem it should have appropriate error handling.

Please tell us about your environment:

  • Node-RED version: v0.18.4
  • node.js version: v6.11.3
  • npm version: v3.10.10
  • Platform/OS: Ubuntu 16.04
  • Browser: Google Chrome 63.0.3239.132(Official Build)(64 bit)on Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions