23
23
import uk .co .real_logic .sbe .generation .java .JavaGenerator ;
24
24
import uk .co .real_logic .sbe .ir .Ir ;
25
25
26
- import java .io .IOException ;
27
-
28
26
import static uk .co .real_logic .sbe .SbeTool .*;
29
27
30
28
public enum TargetCodeGeneratorLoader implements TargetCodeGenerator
31
29
{
32
30
JAVA ()
33
31
{
34
- public CodeGenerator newInstance (final Ir ir , final String outputDir ) throws IOException
32
+ public CodeGenerator newInstance (final Ir ir , final String outputDir )
35
33
{
36
34
return new JavaGenerator (
37
35
ir ,
@@ -46,15 +44,15 @@ public CodeGenerator newInstance(final Ir ir, final String outputDir) throws IOE
46
44
47
45
CPP ()
48
46
{
49
- public CodeGenerator newInstance (final Ir ir , final String outputDir ) throws IOException
47
+ public CodeGenerator newInstance (final Ir ir , final String outputDir )
50
48
{
51
49
return new CppGenerator (ir , new NamespaceOutputManager (outputDir , ir .applicableNamespace ()));
52
50
}
53
51
},
54
52
55
53
GOLANG ()
56
54
{
57
- public CodeGenerator newInstance (final Ir ir , final String outputDir ) throws IOException
55
+ public CodeGenerator newInstance (final Ir ir , final String outputDir )
58
56
{
59
57
return new GolangGenerator (ir , new GolangOutputManager (outputDir , ir .applicableNamespace ()));
60
58
}
@@ -82,9 +80,7 @@ public static TargetCodeGenerator get(final String name)
82
80
}
83
81
catch (final Exception ex )
84
82
{
85
- // do nothing and fall through
83
+ throw new IllegalArgumentException ( "No code generator for name: " + name , ex );
86
84
}
87
-
88
- throw new IllegalArgumentException ("No code generator for name: " + name );
89
85
}
90
86
}
0 commit comments