-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV2-4252 trim trailing proxy url backslash (#1364)
* DEV2-4252 trim trailing proxy url backslash * run test on linux only
- Loading branch information
1 parent
be6c0cc
commit 77451b9
Showing
8 changed files
with
96 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { window } from "vscode"; | ||
import { Logger } from "./logger"; | ||
|
||
export async function notifyOnError<T>( | ||
action: (this: void) => Promise<T>, | ||
message: string | ||
): Promise<T | undefined> { | ||
try { | ||
return await action(); | ||
} catch (e) { | ||
Logger.error(message, e); | ||
void window | ||
.showErrorMessage( | ||
"Something went wrong, check Tabnine log output for more details", | ||
"Show Log" | ||
) | ||
.then((selection) => { | ||
if (selection === "Show Log") { | ||
Logger.show(); | ||
} | ||
}); | ||
return undefined; | ||
} | ||
} |