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.

@safe, @maybe, @impure, etc decorators should work with generators

See original GitHub issue

Currently it is impossible to work with generator functions with @safe and other decorators.

We need to fix that. Async generators are currently out of scope.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
thepabloaguilarcommented, Jun 11, 2020

About the @safe, I think it’s the correct behavior! Because @safe wraps the function with a try...except, if the function executes correctly @safe will return a Success container containing our Iterator otherwise it’ll return a Failure container containing an Exception.

0reactions
sobolevncommented, Sep 3, 2020

Yes, this should be something different.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Read JavaScript Allongé, the "Six" Edition | Leanpub
JavaScript idioms like function combinators and decorators leverage JavaScript's power to make code easier to read, modify, debug and refactor. JavaScript ...
Read more >
@babel/plugin-proposal-decorators | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Piezoelectric Generators | PIEZO.COM
Generally, a piezo generator must move a specified amount of charge and supply ... Work is maximized when the charge moved permits one...
Read more >
mobx/CHANGELOG.md at main - GitHub
All annotated props of non-plain object are non-configurable. Previously configurable. Observable object should now work more reliably in various (edge) cases.
Read more >
Guidelines for Laser Safety and Hazard Assessment
Most laser devices will be dedicated systems, designed for a specific application. New applications will most probably center on the use of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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