Clean up docs for connect and ConnectionResult (#19509)

* Clean up docs for connect and ConnectionResult

* links

* fix build

* fix
This commit is contained in:
Charles Gagnon
2022-05-25 10:38:00 -07:00
committed by GitHub
parent 6282958bd1
commit 45d7a6dd62
8 changed files with 44 additions and 15 deletions

View File

@@ -685,3 +685,9 @@ export function findSqlVersionInTargetPlatform(targetPlatform: string): number |
}
return undefined;
}
export function throwIfNotConnected(connectionResult: azdataType.ConnectionResult): void {
if (!connectionResult.connected) {
throw new Error(`${connectionResult.errorMessage} (${connectionResult.errorCode})`);
}
}