if (roots.size() == 2) {
Statement exception = roots.get(0);
String line = exception.getLine();
if (line.startsWith("Exception")) {
throw new AssetLoadException(line.substring("Exception ".length()));
} else {
throw new MatParseException("In multiroot shader node definition, expected first statement to be 'Exception'", exception);
}
} else if (roots.size() != 1) {
throw new MatParseException("Too many roots in J3SN file", roots.get(0));