Skip to content

Commit

Permalink
Modified the J3M loader to be a little less like a 1980s text adventure.
Browse files Browse the repository at this point in the history
Added a message to the exception thrown when using an invalid light mode.
Converted it to an IOException instead of the UnsupportedOperationException
(which is a runtime exception) so that the calling code will output a meaningful
error about which asset actually failed.
  • Loading branch information
pspeed42 committed Nov 20, 2018
1 parent c2fe803 commit d5bfe1e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ private void readTechnique(Statement techStat) throws IOException{
technique.setLogic(new SinglePassAndImageBasedLightingLogic(technique));
break;
default:
throw new UnsupportedOperationException();
throw new IOException("Light mode not supported:" + technique.getLightMode());
}

List<TechniqueDef> techniqueDefs = new ArrayList<>();
Expand Down

0 comments on commit d5bfe1e

Please sign in to comment.