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

Introduce nodes and C++ API for error handling #1777

Merged
merged 6 commits into from
May 31, 2019
Merged

Conversation

evgenykochetkov
Copy link
Contributor

@evgenykochetkov evgenykochetkov commented May 13, 2019

Closes #1769
Closes #1771

@evgenykochetkov evgenykochetkov self-assigned this May 13, 2019
@evgenykochetkov evgenykochetkov force-pushed the feat-errors branch 3 times, most recently from 4bb07b7 to f9ab9ba Compare May 14, 2019 13:04
Copy link
Contributor

@brusherru brusherru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

packages/xod-arduino/src/Directives.re Outdated Show resolved Hide resolved
packages/xod-arduino/src/Directives.re Outdated Show resolved Hide resolved
packages/xod-project/src/utils.js Outdated Show resolved Hide resolved
@evgenykochetkov evgenykochetkov force-pushed the feat-errors branch 4 times, most recently from 2ae17d7 to 3f9e26e Compare May 16, 2019 14:18
@evgenykochetkov evgenykochetkov force-pushed the feat-errors branch 2 times, most recently from f04ba07 to 1b028ce Compare May 21, 2019 14:43
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the context object, an error should be computed for each input pin, not for the whole node

packages/xod-arduino/platform/program.tpl.cpp Outdated Show resolved Hide resolved
packages/xod-arduino/platform/runtime.cpp Outdated Show resolved Hide resolved
x => parseInt(x, 10),
R.defaultTo(0),
R.min(127),
R.max(0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes possible to bind "E0" to the "error" node. So when it receives a True into "ERR" pin — it does nothing... 🤔

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Before it would complain about `maybeProp(‘a’, {a: ‘foo’, b: []})`
- adds `raiseError(ctx)` and `getError<input_IN>(ctx) ` functions  to C++ API;
- adds `#pragma XOD error_catch` and `#pragma XOD error_raise`
- reports raised and cleared errors to serial in debug mode
Copy link
Contributor

@brusherru brusherru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM 😄

@evgenykochetkov evgenykochetkov merged commit 84b2507 into master May 31, 2019
@evgenykochetkov evgenykochetkov deleted the feat-errors branch July 16, 2019 14:35
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.

Make watch node catch errors Implement errors
3 participants