Skip to content

Commit dc1a1ba

Browse files
author
Tony Fitzgerald
authored
Update to to remove compile issue with the try catch
1 parent f1a2a0c commit dc1a1ba

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

projects/com.ibm.cics.server.examples.wlp.link/src/com/ibm/cics/server/examples/wlp/link/HelloLiberty.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,21 @@ public class HelloLiberty {
3333
public void printMessage() {
3434
StringBuilder sb = new StringBuilder();
3535
sb.append("Hello ");
36+
Channel currentChannel = Task.getTask().getCurrentChannel();
3637
try {
37-
Channel currentChannel = Task.getTask().getCurrentChannel();
3838
if (currentChannel != null && currentChannel.getContainer("NAME") != null) {
3939
Container nameContainer = currentChannel.getContainer("NAME");
4040
sb.append(nameContainer.getString());
4141
} else {
4242
sb.append(Task.getTask().getUSERID());
4343
}
44-
sb.append(" from Liberty server ");
45-
sb.append(System.getProperty("com.ibm.cics.jvmserver.wlp.server.name"));
46-
System.out.println(sb.toString());
47-
} catch (InvalidRequestException | ContainerErrorException
48-
| ChannelErrorException | CCSIDErrorException
49-
| CodePageErrorException | LengthErrorException e) {
44+
} catch (InvalidRequestException | ContainerErrorException | ChannelErrorException | CCSIDErrorException
45+
| CodePageErrorException e) {
5046
e.printStackTrace();
5147
Task.getTask().abend("OHNO");
5248
}
49+
sb.append(" from Liberty server ");
50+
sb.append(System.getProperty("com.ibm.cics.jvmserver.wlp.server.name"));
51+
System.out.println(sb.toString());
5352
}
5453
}

0 commit comments

Comments
 (0)