Nucleus handler tools βΊ Docs βΊ Checks
A return inside finally
Why it matters
A return/throw in finally overrides the one in try/catch, hiding errors.
Example
β Wrong
function f() {
try {
return 1;
} finally {
return 2;
}
}
f();β Right
function f() {
try {
return 1;
} finally {
Context.StartArguments = "";
}
}How to fix it
Don't return or throw in finally.
Turn it off, or change how it shows
Each check can be shown as an error, warning, info or hint, or turned off. VS Code: "splitscreenme.lint.rules": { "no-unsafe-finally": "off" } in your settings. Notepad++: Plugins βΊ Nucleus Co-op handlers βΊ Settings. Command line: ncdev lint --rule no-unsafe-finally=off. Other editors: the lint.rules setting of ncdev lsp.
Is this right?
Tell us what's wrong