本文整理匯總了TypeScript中alertify.js.error方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript js.error方法的具體用法?TypeScript js.error怎麽用?TypeScript js.error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類alertify.js
的用法示例。
在下文中一共展示了js.error方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: showError
function showError(error: NotifyUserError, url: string, line: number, column: number) {
let message = error.message.replace('\n', '</br>');
switch (error.severity) {
case 'warning':
alertify.log(message);
break;
case 'error':
alertify.error(message);
break;
default:
alertify.error(message);
}
}
示例2: extractMergedNotebook
function extractMergedNotebook(widget: NotebookMergeWidget): nbformat.INotebookContent {
let nb = widget.model.serialize();
let validated = widget.validateMerged(nb);
if (JSON.stringify(nb) !== JSON.stringify(validated)) {
alertify.error('Value in internal model did not correspond to value from editors. ' +
'The values in the editors were used, but you should double check the output.');
}
return nb;
}
示例3: onSubmissionFailed
/**
* Callback for a failed store of the submitted merged notebook
*/
function onSubmissionFailed(response: string) {
alertify.error('Was not able to save the notebook! See console and/or server log for details.');
}