-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Fallback to the |Dummy| Pattern when we fail to parse a Shading Pattern (issue 5509) #5516
Conversation
case PatternType.TENSOR_PATCH_MESH: | ||
return new Shadings.Mesh(shading, matrix, xref, res); | ||
default: | ||
throw new Error('Unknown PatternType: ' + type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isnt this now throwing an unknown pattern type exception, which is catched and ignored a few lines down?
Could this perhaps directly use the dummy shading?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to avoid duplicating the following lines twice (hence why I choose to throw):
UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern);
return new Shadings.Dummy();
The end result is the same, just less repetition. Also, this particular code path shouldn't be very hot in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I thought that code de-duplication was the main driver. In general Exeption handlers always look odd. I cannot come up with a better solution, just wanted to mention it.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 2 Live output at: http://107.22.172.223:8877/090558294e3e453/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 2 Live output at: http://107.21.233.14:8877/9cea194a4db83d6/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/090558294e3e453/output.txt Total script time: 20.49 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/9cea194a4db83d6/output.txt Total script time: 23.90 mins
|
/botio makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/cc0358054549288/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 1 Live output at: http://107.21.233.14:8877/37622bdd3f0fa2f/output.txt |
Thank you for the patch |
Fallback to the |Dummy| Pattern when we fail to parse a Shading Pattern (issue 5509)
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/cc0358054549288/output.txt Total script time: 20.62 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/37622bdd3f0fa2f/output.txt Total script time: 23.72 mins
|
Fixes #5509.
/cc @yurydelendik