mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 18:48:33 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -10,7 +10,7 @@ import * as arrays from 'vs/base/common/arrays';
|
||||
function exceptionToErrorMessage(exception: any, verbose: boolean): string {
|
||||
if (exception.message) {
|
||||
if (verbose && (exception.stack || exception.stacktrace)) {
|
||||
return nls.localize('stackTrace.format', "{0}: {1}", detectSystemErrorMessage(exception), exception.stack || exception.stacktrace);
|
||||
return nls.localize('stackTrace.format', "{0}: {1}", detectSystemErrorMessage(exception), stackToString(exception.stack) || stackToString(exception.stacktrace));
|
||||
}
|
||||
|
||||
return detectSystemErrorMessage(exception);
|
||||
@@ -19,6 +19,14 @@ function exceptionToErrorMessage(exception: any, verbose: boolean): string {
|
||||
return nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
|
||||
}
|
||||
|
||||
function stackToString(stack: string[] | string | undefined): string | undefined {
|
||||
if (Array.isArray(stack)) {
|
||||
return stack.join('\n');
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
function detectSystemErrorMessage(exception: any): string {
|
||||
|
||||
// See https://nodejs.org/api/errors.html#errors_class_system_error
|
||||
|
||||
Reference in New Issue
Block a user