Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reserve promise rejections (i.e. async exceptions) for exceptional circumstances #485
With the browser's native
I believe this to be the desired behavior. Especially when using the up-coming async/await feature of ES (being used already via Babel), the current swal2 behavior leads to some awkward control-flow...
The following would be a bit nicer.
@limonte Would you review a PR adding an option to enable this behavior? Let's call the option
@limonte @toverux Does the same go with the API for the
The control-flow is not as bad here, but I think in principal we should not mix user errors with actual technical/system errors.
It makes it difficult to debug actual errors thrown inside the function. Also, if there are any errors in production, I want them bubbled up to Rollbar error reporting.
Same goes for rejections in
That said, to support validations for the "multiple-input" scenario, could we always call the function, even if
added a commit
May 15, 2017
referenced this issue
Nov 7, 2017
rude answer to rude message: https://gist.github.com/Rich-Harris/0b6f317657f5167663b493c722647221