Skip to content

Stop using Exceptions for flow-control? #31306

Open
@greggman

Description

@greggman

Description

I'm trying to debug some issues with three.js and webgpu. I picked the caustics example, set the devtools to stop on caught and uncaught exceptions. I run it and start hitting exceptions that are expected. This makes it hard to debug. I'm going to assume this affects all three.js devs and not just me.

Yes, I know I can add a "never stop here" breakpoint and the several places that were hit. Reloading the page with them set ends up making the page take ~16 seconds to start. Fixing Chrome though is not the issue. Rather, it would just be nice to not have to deal with these exceptions as flow control in the first place.

Solution

If it's not too hard, stop using exceptions as flow-control?

Alternatives

N/A

Additional context

Obviously I'm not trying to dictate how this project runs. I'm only noticing this issue is making it hard for me, and wondering if it makes it hard for anyone else, and if so, would it be that hard to refactor? Maybe it does not affect anyone else. I'm guessing the three.js devs themselves don't find this an issue. Maybe they can suggest their own workflows in the comments below.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions