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

Loaders: Bubble parsing errors in remaining data texture loaders. #26499

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jul 27, 2023

Fixed #26457.

Description

This PR updates the remaining data texture loaders so they properly throw parsing errors.

EXRLoader already throws errors so there are just some formatting updates. LogLuvLoader and RGBELoader required some updates.

TIFFLoader and RGBMLoader use external modules for parsing which I did not want to monkey patch.

@Mugen87 Mugen87 added this to the r156 milestone Jul 27, 2023
@Mugen87 Mugen87 merged commit 680ce88 into mrdoob:dev Jul 28, 2023
@@ -2047,8 +2047,8 @@ class EXRLoader extends DataTextureLoader {

if ( ( spec & ~ 0x04 ) != 0 ) { // unsupported tiled, deep-image, multi-part

console.error( 'EXRHeader:', EXRHeader );
throw new Error( 'THREE.EXRLoader: provided file is currently unsupported.' );
console.error( 'THREE.EXRHeader:', EXRHeader );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EXRHeader isn't a Three's class, why is it prefixed with THREE.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataTextureLoader: Properly bubble parsing errors to onError
2 participants