本文整理汇总了TypeScript中common/core/services/util-ui-service.showErrorDialog函数的典型用法代码示例。如果您正苦于以下问题:TypeScript showErrorDialog函数的具体用法?TypeScript showErrorDialog怎么用?TypeScript showErrorDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showErrorDialog函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
response => {
if (response.config.timeout.$$state.value !== 'Cancelled!') {
//handle errors:
const errorText = this.$izendaLocaleService.localeText('js_FailedToLoadPreview', 'Failed to load preview.');
this.$izendaUtilUiService.showErrorDialog(errorText);
resolver.reject(response.data);
}
});
示例2:
error => {
const errorTitle = this.$izendaLocaleService.localeText('js_FailedPrintReportTitle', 'Report print error');
let errorText = this.$izendaLocaleService.localeText('js_FailedPrintReport',
'Failed to print report "{0}". Error description: {1}.');
errorText = errorText.replaceAll('{0}', this.model.reportFullName ? this.model.reportFullName : '');
errorText = errorText.replaceAll('{1}', error);
this.$izendaUtilUiService.showErrorDialog(errorText, errorTitle);
console.error(error);
});
示例3: if
}, response => {
// handle request error
this.removeRequest(response.config.requestId);
let needToReject = true;
let errorText: string;
if (resolver['errorOptions'] != null) {
needToReject = false;
errorText = resolver['errorOptions'].handler.apply(response,
resolver['errorOptions'].params ? resolver['errorOptions'].params : []);
} else if (response.message)
errorText = response.message;
else if (response.config)
errorText = this.$izendaLocaleService.localeText('js_QueryFailed', 'Query failed') + ': ' + JSON.stringify(response.config);
else
errorText = this.$izendaLocaleService.localeText('localeVariable', 'An unknown error occurred.');
if (resolver['$izendaRsQueryCancelled']) {
if (needToReject)
resolver.reject(errorText);
else
this.$izendaUtilUiService.showErrorDialog(errorText);
}
});
示例4:
error => {
const errorMessage =
this.$izendaLocaleService.localeText('js_DashboardAutoRefreshError', 'Failed to get auto refresh intervals');
this.$izendaUtilUiService.showErrorDialog(`${errorMessage}: ${error}`);
});
示例5:
}, error => {
const errorMessage = this.$izendaLocaleService.localeText('js_LayoutLoadError', 'Failed to load dashboard layout');
this.$izendaUtilUiService.showErrorDialog(`${errorMessage}: ${error}`);
});