the current JCI implementation is not correctly handling all problems, for instance ParseExceptions are being thrown up and not placed into the problems array. I've since added this to the compiler.compile method, but I can't help feeling this should be handled elsewhere. Am I correct in assuming that IOException and CompileException are correctly handled, what about ScanException, is that thrown too without being added to the problems array.
This is what I've added to JaninoJavaCompiler for now.
try
{
compiler.compile(resources);
}
catch ( ScanException e )
{
problems.add(new JaninoCompilationProblem(e)); // is this already handled?
}
catch ( ParseException e )
{
problems.add(new JaninoCompilationProblem(e)); // we know this isn't handled
}
catch ( IOException e )
{
// I'm hoping the existing compiler problems handler catches these
}
catch ( CompileException e )
{
// I'm hoping the existing compiler problems handler catches these
}
the current JCI implementation is not correctly handling all problems, for instance ParseExceptions are being thrown up and not placed into the problems array. I've since added this to the compiler.compile method, but I can't help feeling this should be handled elsewhere. Am I correct in assuming that IOException and CompileException are correctly handled, what about ScanException, is that thrown too without being added to the problems array.
This is what I've added to JaninoJavaCompiler for now.
{ compiler.compile(resources); }try
catch ( ScanException e )
{ problems.add(new JaninoCompilationProblem(e)); // is this already handled? }catch ( ParseException e )
{ problems.add(new JaninoCompilationProblem(e)); // we know this isn't handled }catch ( IOException e )
{ // I'm hoping the existing compiler problems handler catches these }catch ( CompileException e )
{ // I'm hoping the existing compiler problems handler catches these }