Treat "Non-ascii character in FixedAsciiString" as ValidationError

We have lots of bug reports that just say "Non-ascii character in FixedAsciiString" when we think there's another real error that's not being thrown
This commit is contained in:
Thomas Weber committed 2021-10-09 15:51:29 -05:00
1 parent a752db1631
commit 29405e7956
1 file changed
+4 -1
+4 -1
View File
@@ -412,7 +412,10 @@ class VirtualMachine extends EventEmitter {
json.projectVersion = 2;
return Promise.resolve([json, sb1.zip]);
} catch (sb1Error) {
if (sb1Error instanceof ValidationError) {
if (
sb1Error instanceof ValidationError ||
`${sb1Error}` === 'Non-ascii character in FixedAsciiString'
) {
// The input does not validate as a Scratch 1 file.
} else {
// The project appears to be a Scratch 1 file but it