Skip to content

Commit fc80bb2

Browse files
committed
style: make error more prominent
1 parent c7c8344 commit fc80bb2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/filesystem.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ export class ScptFileSystemProvider implements vscode.FileSystemProvider {
144144

145145
// Intentionally keeping minimal JXA compability
146146
if ((error as Error).message.includes('A unknown token can’t go after this identifier')) {
147-
vscode.window.showErrorMessage(
148-
'Failed to write file. If you are trying to compile JXA to binary AppleScript, you will need to set the correct language for the source.',
149-
);
147+
vscode.window.showErrorMessage('Could not save file', {
148+
detail:
149+
'This might happen when you are trying to compile JXA to binary AppleScript. To fix this, make sure to set the appropriate language for the source file, i.e. JXA or JavaScript.',
150+
modal: true,
151+
});
150152
return;
151153
}
152154

0 commit comments

Comments
 (0)