2323import uk .co .real_logic .sbe .generation .java .JavaGenerator ;
2424import uk .co .real_logic .sbe .ir .Ir ;
2525
26- import java .io .IOException ;
27-
2826import static uk .co .real_logic .sbe .SbeTool .*;
2927
3028public enum TargetCodeGeneratorLoader implements TargetCodeGenerator
3129{
3230 JAVA ()
3331 {
34- public CodeGenerator newInstance (final Ir ir , final String outputDir ) throws IOException
32+ public CodeGenerator newInstance (final Ir ir , final String outputDir )
3533 {
3634 return new JavaGenerator (
3735 ir ,
@@ -46,15 +44,15 @@ public CodeGenerator newInstance(final Ir ir, final String outputDir) throws IOE
4644
4745 CPP ()
4846 {
49- public CodeGenerator newInstance (final Ir ir , final String outputDir ) throws IOException
47+ public CodeGenerator newInstance (final Ir ir , final String outputDir )
5048 {
5149 return new CppGenerator (ir , new NamespaceOutputManager (outputDir , ir .applicableNamespace ()));
5250 }
5351 },
5452
5553 GOLANG ()
5654 {
57- public CodeGenerator newInstance (final Ir ir , final String outputDir ) throws IOException
55+ public CodeGenerator newInstance (final Ir ir , final String outputDir )
5856 {
5957 return new GolangGenerator (ir , new GolangOutputManager (outputDir , ir .applicableNamespace ()));
6058 }
@@ -82,9 +80,7 @@ public static TargetCodeGenerator get(final String name)
8280 }
8381 catch (final Exception ex )
8482 {
85- // do nothing and fall through
83+ throw new IllegalArgumentException ( "No code generator for name: " + name , ex );
8684 }
87-
88- throw new IllegalArgumentException ("No code generator for name: " + name );
8985 }
9086}
0 commit comments