迁移部分内容
Some checks failed
test / Run tests (push) Failing after 55s
build / Build (push) Failing after 1m18s
Some checks failed
test / Run tests (push) Failing after 55s
build / Build (push) Failing after 1m18s
This commit is contained in:
18
example/error_retry.js
Normal file
18
example/error_retry.js
Normal file
@ -0,0 +1,18 @@
|
||||
// ==UserScript==
|
||||
// @name 重试示例
|
||||
// @namespace https://bbs.tampermonkey.net.cn/
|
||||
// @version 0.1.0
|
||||
// @description try to take over the world!
|
||||
// @author You
|
||||
// @crontab * * once * *
|
||||
// @grant GM_notification
|
||||
// ==/UserScript==
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
// Your code here...
|
||||
GM_notification({
|
||||
title: "retry",
|
||||
text: "10秒后重试"
|
||||
});
|
||||
reject(new CATRetryError("xxx错误", 10));
|
||||
});
|
Reference in New Issue
Block a user