Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/extensionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ export class ExtensionManager {
delete __non_webpack_require__.cache[
__non_webpack_require__.resolve(res[0].path)
];
const nwConfig = require(/* webpackIgnore: true */ res[0].path);
const workspaceState = this.context.workspaceState;
workspaceState.update('nwConfig', nwConfig);
try {
const nwConfig = require(/* webpackIgnore: true */ res[0].path);
const workspaceState = this.context.workspaceState;
workspaceState.update('nwConfig', nwConfig);
} catch (err) {
Copy link
Member

Choose a reason for hiding this comment

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

Instead we can show the popup window to show the error with the path

throw new Error(`Error while trying to require Nightwatch config file from "${res[0].path}": ${err}`)
}
});

nightwatchExt.startSession();
Expand Down