本文整理汇总了TypeScript中util/UserNotification.error函数的典型用法代码示例。如果您正苦于以下问题:TypeScript error函数的具体用法?TypeScript error怎么用?TypeScript error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了error函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
const failCallback = (error) => {
let err_message = error.message;
let err_body = error.additional.body;
if (err_body && err_body.message) {
err_message = error.additional.body.message;
}
UserNotification.error(`Testing Grok pattern "${pattern.name}" failed with status: ${err_message}`,
"Could not test Grok pattern");
};
示例2:
promise.catch((errorThrown) => {
UserNotification.error('Details: ' + errorThrown,
'Could not try regular expression. Make sure that it is valid.');
});
示例3:
promise.catch((error) => {
if (error.additional.status !== 404) {
UserNotification.error("Loading widget information failed with status: " + error,
"Could not load widget information");
}
});
示例4:
}, (error) => {
if (error.additional.status !== 404) {
UserNotification.error("Delete user failed with status: " + error,
"Could not delete user");
}
});
示例5:
.catch(errorThrown => {
UserNotification.error("Loading message information failed with status: " + errorThrown,
"Could not load message information");
});
示例6:
promise.catch((errorThrown) => {
UserNotification.error('Details: ' + errorThrown, 'Could not check if lookup table translates the string');
});