mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
warn instead of error on disabled apis (#9193)
This commit is contained in:
@@ -806,79 +806,99 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||||||
// namespace: debug
|
// namespace: debug
|
||||||
const debug: typeof vscode.debug = {
|
const debug: typeof vscode.debug = {
|
||||||
get activeDebugSession() {
|
get activeDebugSession() {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
return undefined;
|
return undefined!;
|
||||||
},
|
},
|
||||||
get activeDebugConsole() {
|
get activeDebugConsole() {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
return undefined!;
|
return undefined!;
|
||||||
},
|
},
|
||||||
get breakpoints() {
|
get breakpoints() {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
onDidStartDebugSession(listener, thisArg?, disposables?) {
|
onDidStartDebugSession(listener, thisArg?, disposables?) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidTerminateDebugSession(listener, thisArg?, disposables?) {
|
onDidTerminateDebugSession(listener, thisArg?, disposables?) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidChangeActiveDebugSession(listener, thisArg?, disposables?) {
|
onDidChangeActiveDebugSession(listener, thisArg?, disposables?) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidReceiveDebugSessionCustomEvent(listener, thisArg?, disposables?) {
|
onDidReceiveDebugSessionCustomEvent(listener, thisArg?, disposables?) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidChangeBreakpoints(listener, thisArgs?, disposables?) {
|
onDidChangeBreakpoints(listener, thisArgs?, disposables?) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
registerDebugConfigurationProvider(debugType: string, provider: vscode.DebugConfigurationProvider) {
|
registerDebugConfigurationProvider(debugType: string, provider: vscode.DebugConfigurationProvider) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
registerDebugAdapterDescriptorFactory(debugType: string, factory: vscode.DebugAdapterDescriptorFactory) {
|
registerDebugAdapterDescriptorFactory(debugType: string, factory: vscode.DebugAdapterDescriptorFactory) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
registerDebugAdapterTrackerFactory(debugType: string, factory: vscode.DebugAdapterTrackerFactory) {
|
registerDebugAdapterTrackerFactory(debugType: string, factory: vscode.DebugAdapterTrackerFactory) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration, parentSessionOrOptions?: vscode.DebugSession | vscode.DebugSessionOptions) {
|
startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration, parentSessionOrOptions?: vscode.DebugSession | vscode.DebugSessionOptions) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
addBreakpoints(breakpoints: vscode.Breakpoint[]) {
|
addBreakpoints(breakpoints: vscode.Breakpoint[]) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
removeBreakpoints(breakpoints: vscode.Breakpoint[]) {
|
removeBreakpoints(breakpoints: vscode.Breakpoint[]) {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
asDebugSourceUri(source: vscode.DebugProtocolSource, session?: vscode.DebugSession): vscode.Uri {
|
asDebugSourceUri(source: vscode.DebugProtocolSource, session?: vscode.DebugSession): vscode.Uri {
|
||||||
throw new Error('Debug api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Debug API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const tasks: typeof vscode.tasks = { // {{SQL CARBON EDIT}} disable tasks api
|
const tasks: typeof vscode.tasks = { // {{SQL CARBON EDIT}} disable tasks api
|
||||||
registerTaskProvider: (type: string, provider: vscode.TaskProvider) => {
|
registerTaskProvider: (type: string, provider: vscode.TaskProvider) => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
fetchTasks: (filter?: vscode.TaskFilter): Thenable<vscode.Task[]> => {
|
fetchTasks: (filter?: vscode.TaskFilter): Thenable<vscode.Task[]> => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
executeTask: (task: vscode.Task): Thenable<vscode.TaskExecution> => {
|
executeTask: (task: vscode.Task): Thenable<vscode.TaskExecution> => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
get taskExecutions(): vscode.TaskExecution[] {
|
get taskExecutions(): vscode.TaskExecution[] {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidStartTask: (listeners, thisArgs?, disposables?) => {
|
onDidStartTask: (listeners, thisArgs?, disposables?) => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidEndTask: (listeners, thisArgs?, disposables?) => {
|
onDidEndTask: (listeners, thisArgs?, disposables?) => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidStartTaskProcess: (listeners, thisArgs?, disposables?) => {
|
onDidStartTaskProcess: (listeners, thisArgs?, disposables?) => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
},
|
},
|
||||||
onDidEndTaskProcess: (listeners, thisArgs?, disposables?) => {
|
onDidEndTaskProcess: (listeners, thisArgs?, disposables?) => {
|
||||||
throw new Error('Tasks api is not allowed in Azure Data Studio');
|
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
|
||||||
|
return undefined!;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user