mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
Merge pull request #340 from hiroj/handling_stackOverflowException
handling stackOverflowException
This commit is contained in:
commit
230f842874
|
|
@ -255,9 +255,20 @@ namespace UniGLTF
|
|||
throw new Exception("chunk 1 is not BIN");
|
||||
}
|
||||
|
||||
var jsonBytes = chunks[0].Bytes;
|
||||
ParseJson(Encoding.UTF8.GetString(jsonBytes.Array, jsonBytes.Offset, jsonBytes.Count),
|
||||
new SimpleStorage(chunks[1].Bytes));
|
||||
try
|
||||
{
|
||||
var jsonBytes = chunks[0].Bytes;
|
||||
ParseJson(Encoding.UTF8.GetString(jsonBytes.Array, jsonBytes.Offset, jsonBytes.Count),
|
||||
new SimpleStorage(chunks[1].Bytes));
|
||||
}
|
||||
catch(StackOverflowException ex)
|
||||
{
|
||||
throw new Exception("[UniVRM Import Error] json parsing failed, nesting is too deep.\n" + ex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseUniJSONParser;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user