Files
azuredatastudio/src/sql/base/common/errors.ts
Amir Omidi 5da0e16e44 Check for error (#7711)
* Custom error
2019-10-14 16:26:51 -07:00

19 lines
641 B
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export function invalidProvider(name?: string): Error {
if (name) {
return new Error(`Invalid provider: ${name}`);
} else {
return new Error('Invalid provider');
}
}
export class UserCancelledConnectionError extends Error {
constructor(message?: string) {
super(message);
}
}