Skip to content

Commit

Permalink
add error message if input section is missing; fixes #76558
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Jul 25, 2019
1 parent 808a11a commit 30eaedc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ export abstract class BaseConfigurationResolverService extends AbstractVariableR
*/
private showUserInput(variable: string, inputInfos: ConfiguredInput[]): Promise<string | undefined> {

if (!inputInfos) {
return Promise.reject(new Error(nls.localize('inputVariable.noInputSection', "Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.", variable, 'input')));
}

// find info for the given input variable
const info = inputInfos.filter(item => item.id === variable).pop();
if (info) {
Expand Down Expand Up @@ -307,4 +311,4 @@ export class ConfigurationResolverService extends BaseConfigurationResolverServi
}
}

registerSingleton(IConfigurationResolverService, ConfigurationResolverService, true);
registerSingleton(IConfigurationResolverService, ConfigurationResolverService, true);

0 comments on commit 30eaedc

Please sign in to comment.