本文整理匯總了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}`);
});