Skip to content

Commit b58e16f

Browse files
authored
Merge pull request #173 from ty-d/ImportErrorAlert
Alert on import error
2 parents 7d8f3c8 + 51f2b6f commit b58e16f

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/api/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@ export class AtelierAPI {
200200
if (data.result.status && data.result.status !== "") {
201201
const status: string = data.result.status;
202202
outputChannel.appendLine(status);
203-
if (status.endsWith("is marked as read only by source control hooks.")) {
204-
vscode.window.showWarningMessage(status, { modal: true });
205-
}
206203
throw new Error(data.result.status);
207204
}
208205
if (data.status.summary) {

src/commands/compile.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ async function compileFlags(): Promise<string> {
2121

2222
async function importFile(file: CurrentFile): Promise<any> {
2323
const api = new AtelierAPI(file.uri);
24-
return api.putDoc(
25-
file.name,
26-
{
27-
content: file.content.split(/\r?\n/),
28-
enc: false,
29-
},
30-
true
31-
);
24+
return api
25+
.putDoc(
26+
file.name,
27+
{
28+
content: file.content.split(/\r?\n/),
29+
enc: false,
30+
},
31+
true
32+
)
33+
.catch((error) => vscode.window.showErrorMessage(error.message));
3234
}
3335

3436
function updateOthers(others: string[]) {

0 commit comments

Comments
 (0)