Skip to content

Commit 4680614

Browse files
committed
Add descriptive message for archive import failure
1 parent d360153 commit 4680614

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extensions/ql-vscode/src/databaseFetcher.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ export async function importArchiveDatabase(
158158
);
159159
}
160160
} catch (e) {
161-
showAndLogErrorMessage(e.message);
161+
if (e.message.includes("unexpected end of file")) {
162+
showAndLogErrorMessage("Database is corrupt or too large. Try unzipping outside of VS Code and importing the unzipped folder instead.");
163+
} else {
164+
showAndLogErrorMessage(e.message);
165+
}
162166
}
163167
return item;
164168
}

0 commit comments

Comments
 (0)