mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 09:42:34 -05:00
SQL Operations Studio Public Preview 1 (0.23) release source code
This commit is contained in:
14
src/vs/base/common/assert.ts
Normal file
14
src/vs/base/common/assert.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.
|
||||
*/
|
||||
export function ok(value?: any, message?: string) {
|
||||
if (!value || value === null) {
|
||||
throw new Error(message ? 'Assertion failed (' + message + ')' : 'Assertion Failed');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user