question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

configurable error handling

See original GitHub issue

Is it possible to turn try { ... } catch off in the bluebird promise implementation ?

It would be nice if we could opt out of having the then handler wrapped in a try catch.

This would enable people to make different decisions about error handling opinions instead of going with the “defaults” promises/A+ choose.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:30 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
domeniccommented, Dec 22, 2013
class PromiseThatMissesThePointOfPromises {
  then(onSomething, onSomethingElse) {
    return super(
      value => try {
        return onSomething(value);
      } catch (e) { setImmediate(() => throw e); },
      reason => try {
        return onSomethingElse(reason);
      } catch (e) { setImmediate(() => throw e); }
    );
  }
}
0reactions
spioncommented, Aug 25, 2014

@wprater Its here - https://github.com/spion/promise-streams - but these dayse I recommend looking at reimplementations of node streams (instead of extensions like promise-streams). Node streams are too broken and quirky to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling - OWASP Cheat Sheet Series
The article shows how to configure a global error handler as part of your application's runtime configuration. In some cases, it may be...
Read more >
Error Handlers | MuleSoft Documentation
From Studio, drag an Error Handler component from the Mule Palette to the canvas, and configure it components through the UI. · In...
Read more >
Error Handling Configuration Properties - IBM
Table 1 shows the configuration properties for error messages. For additional information on configuring the error handling, see Errors Sending Responses .
Read more >
Chapter 9. Error Handling Configuration - JBoss.org
If an error occurs, the request control-flow changes according to the configuration. This configuration is known as the control policy. 9.2.1. Policy Delegation ......
Read more >
Handle errors in ASP.NET Core | Microsoft Learn
To configure a custom error handling page for the Production environment, call UseExceptionHandler. This exception handling middleware:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found