-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Implement panic call handling for all modules #3163
Conversation
@dnc40085 can you please review 6cfbad4. Lua 5.3 does not support |
This PR has 53 files changed so there's no way that I can sensibly cover them all. Mode of these are the same edit pattern to module code to replaces a Also not that the last Travis build has failed on the MS Windows build of luac.cross. I'll examine the logs an fix this on my next push. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/* One first time through set automatic restart after 2s delay */ | ||
if (!restart_timer.timer_func) { | ||
os_timer_setfn(&restart_timer, restart_callback, NULL); | ||
os_timer_arm(&restart_timer, DELAY2SEC, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nwf,
I've just done a git diff 06aa248f bd9b4253 | gedit -
(the patch for this PR) and did a global highlight for \t
. This whole tab issue is a PITA. The Lua style uses an indent depth of 2 chars and always uses two spaces to per indent. It does use tabs (with a default of 8 chars per stop)
However modules are all over the place. Some use tab indents (and some assume a tab stop of 4) so it is extremely easy to get the visual alignment screwed. My vote is that we should address this as a module-wide cleanup rather piecemeal one-offs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some use tab indents (and some assume a tab stop of 4) so it is extremely easy to get the visual alignment screwed.
#1168, created over 4y ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Golden oldies that still bite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the issue with the Windows build was that I updated SPIFFS and the latest version removed an MSC compatibility fix which I've put back in, and it now compiles clean. @marcelstoer @nwf I would prefer to merge this sooner rather later as it contains a really useful enhancement and I've got other stuff backed up. Unless anyone objects, I will do this tomorrow. |
I will now merge. |
|
Fixes #3078. (Also #3141 and @KT819GM Gitter comment at Jun 12 15:04)
Make sure all boxes are checked (add x inside the brackets) when you submit your contribution, remove this sentence before doing so.
dev
branch rather than formaster
.docs/*
.This is a fairly large patch to the modules plus the addition of a
node.setonerror()
function so that CBs throwing an error give a proper traceback. Apps can also override the default action of rebooting after such an error.Note that this PR is submitted for review at this stage. I still have some documentation to add and any changes in the light of feedback.