> The following code seems a bit strange to me. Why does it throw a
> compilation failure exception when there are warnings?
>
>             if ( !errors.isEmpty() )
>             {
>                 throw new CompilationFailureException( errors );
>             }
>             else
>             {
>                 throw new CompilationFailureException( warnings );
>             }
>

It's due to the wrapping if clause you're not quoting:

if ( failOnError && !compilerResult.isSuccess() )

The compilation has failed as indicated by !compilerResult.isSuccess().

/Anders

Reply via email to