Skip to content

Commit

Permalink
catch errors early, avoid vscode stalling for 3s to wait for someone to
Browse files Browse the repository at this point in the history
handle rejection
  • Loading branch information
tintinweb committed May 28, 2021
1 parent e34858a commit 669864d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

## v0.1.0

🥳

- new: major parser refactor #67
- new: highlighting of external calls (yellow gutter icon)
- new: 🎯 highlighting of external calls (yellow gutter icon)
- this is best effort highlighting and we might miss some external calls depending on whether it is possible to resolve them.
- do not completly rely on this feature :)
- new: cockpit view that lists external calls in the currently selected contract (click into a contract in the editor for the view to update)
- fix: typeError "cannot read property length of undefined"
- fix: misplaced decoration when document changes
- new: adjusted graphviz view titles
- new: decorate identifiers that are storage references (treating them like state-vars)
- update: code cleanup; refactored decoration logic and moved it to submodule
- new: resolve inherited names (hover: declaration link)

## v0.0.32 - v0.0.33

Expand Down
21 changes: 13 additions & 8 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,19 @@ function analyzeSourceUnit(cancellationToken, document, editor) {
return;
}

g_workspace.add(document.fileName, { content: document.getText() }).then(
(sourceUnit) => {
console.log(`✓ inspect ${sourceUnit.filePath}`);
}
).catch(e => {
console.log(document.fileName);
console.log(e);
});
try {
g_workspace.add(document.fileName, { content: document.getText() }).then(
(sourceUnit) => {
console.log(`✓ inspect ${sourceUnit.filePath}`);
}
).catch(e => {
console.error(document.fileName);
console.error(e);
});
} catch (e){
console.error(e);
}


g_workspace.withParserReady().then((finished) => {

Expand Down

0 comments on commit 669864d

Please sign in to comment.