mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2025-07-07 17:57:39 +08:00
- Add npm package.json to make easier maintaining dependencies. - Make markdown files consistent using remark. - Wrap markdown lines to 100 characters. - Better README.md layout and visual. - Enable VuePress landing/home page. - Upgrade to latest VuePress version. - Add link to the new Qt Marketplace.
504 B
504 B
QPromiseUndefinedException
Since: 0.5.0
This exception is thrown when rejecting a promise with no explicit reason, for example:
QPromise<int> promise([](const QPromiseResolve<int>& resolve, const QPromiseReject<int>& reject) {
async_method([=](bool success, int result) {
if (success) {
resolve(result);
} else {
reject();
}
});
});
promise.fail([](const QPromiseUndefinedException&) {
// promise rejected without reason!
})