Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix silent error in run_task #2959

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

50Bytes-dev
Copy link
Contributor

No description provided.

@ndonkoHenri
Copy link
Collaborator

Thanks for your contribution!

Could you please provide a brief description to your PR? For example, the output before and after this PR, and possibly some test code for the review.

@ndonkoHenri ndonkoHenri added the enhancement Improvement/Optimization label Mar 29, 2024
@50Bytes-dev
Copy link
Contributor Author

Thanks for your contribution!

Could you please provide a brief description to your PR? For example, the output before and after this PR, and possibly some test code for the review.

async def main(page: ft.Page):
    async def task():
        1 / 0  # silent error, my PR fix it

    async def raise_error(e):
        page.run_task(task)
        
    btn = ft.ElevatedButton(
        text="Raise error",
        on_click=raise_error,
    )

    page.add(btn)

app = ft.app(main, export_asgi_app=True)

if __name__ == "__main__":
    import uvicorn

    uvicorn.run(
        "app:app",
        host="0.0.0.0",
        port=8550,
        reload=True,
    )

@FeodorFitsner FeodorFitsner merged commit d21c512 into flet-dev:main Apr 3, 2024
2 checks passed
@50Bytes-dev 50Bytes-dev deleted the silent_error_fix branch April 3, 2024 04:50
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* fix silent error in run_task

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement/Optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants