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

Replace throw with console.error to prevent blocking the main thread #2077

Merged
merged 5 commits into from
May 9, 2024

Conversation

MrKou47
Copy link
Member

@MrKou47 MrKou47 commented Apr 16, 2024

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This prevent tweaks the shader registration process to provide a better DX for developer.

What is the current behavior? (You can also link to an open issue here)

Currently, if Galacean detects a shader registered with the same name, it will throw an uncaught error, which will block the main thread.

What is the new behavior (if this is a feature change)?

We just console an error inside of throwing it to prevent blocking the user's main thread.

@GuoLei1990 GuoLei1990 changed the title chore: replace throw with console.error to prevent blocking the main thread Replace throw with console.error to prevent blocking the main thread May 9, 2024
@GuoLei1990 GuoLei1990 added the shader Shader related functions label May 9, 2024
@GuoLei1990 GuoLei1990 merged commit 3b5d294 into galacean:main May 9, 2024
6 checks passed
@GuoLei1990 GuoLei1990 added the bug Something isn't working label May 13, 2024
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Jun 3, 2024
* dev/1.3:
  fix: use default material to prevent material[] (galacean#2104)
  Add `Script` in `onStart` may cause some functions to not be executed correctly. (galacean#2102)
  "v1.2.0-beta.5"
  Redesign `Skin` of `SkinnedMeshRenderer` (galacean#2100)
  Fix glTF renderer component's order is random now (galacean#2097)
  "v1.2.0-beta.4"
  "v1.2.0-beta.3"
  Fix the bug of animation playback for multiple same type components under an Entity (galacean#2095)
  Support get any subAsset from GLTFParser (galacean#2093)
  Replace `throw` with `console.error` to prevent blocking the main thread (galacean#2077)
  Fixed the problem that function macro declaration is lost after compilation (galacean#2087)
@MrKou47 MrKou47 deleted the chore/prevent-throw branch June 5, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working shader Shader related functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants