Skip to content

Commit c5ed348

Browse files
committed
review change
1 parent 9052979 commit c5ed348

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

java/src/main/java/com/cybersource/ws/client/Client.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,27 @@ public static Map runTransaction(
133133
con=customConnectionClass.getDeclaredConstructor(constructor_Args).newInstance(mc, builder, logger);
134134

135135
} catch (InstantiationException e) {
136+
logger.log(Logger.LT_INFO, "Failed to Instantiate the class "+e);
136137
throw new ClientException(e, false, null);
137138
} catch (IllegalAccessException e) {
139+
logger.log(Logger.LT_INFO, "Could not Access the method invoked "+e);
138140
throw new ClientException(e, false, null);
139141
} catch (ClassNotFoundException e) {
140-
logger.log(Logger.LT_INFO, "Could not load the custom class ");
142+
logger.log(Logger.LT_INFO, "Could not load the custom HTTP class ");
141143
throw new ClientException(e, false, null);
142144
} catch (IllegalArgumentException e) {
145+
logger.log(Logger.LT_INFO, "Method invoked with Illegal Argument list "+e);
143146
throw new ClientException(e, false, null);
144147
} catch (SecurityException e) {
148+
logger.log(Logger.LT_INFO, "Security Exception "+e);
145149
throw new ClientException(e, false, null);
146150
} catch (InvocationTargetException e) {
151+
logger.log(Logger.LT_INFO, "Exception occured while calling the method "+e);
147152
throw new ClientException(e, false, null);
148153
} catch (NoSuchMethodException e) {
154+
logger.log(Logger.LT_INFO, "Method not found ");
149155
throw new ClientException(e, false, null);
150-
}
156+
}
151157
}
152158
else{
153159
con = Connection.getInstance(mc, builder, logger);

java/src/main/java/com/cybersource/ws/client/XMLClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,25 @@ public static Document runTransaction(
188188
con=customConnectionClass.getDeclaredConstructor(constructor_Args).newInstance(mc, builder, logger);
189189

190190
} catch (InstantiationException e) {
191+
logger.log(Logger.LT_INFO, "Failed to Instantiate the class "+e);
191192
throw new ClientException(e, false, null);
192193
} catch (IllegalAccessException e) {
194+
logger.log(Logger.LT_INFO, "Could not Access the method invoked "+e);
193195
throw new ClientException(e, false, null);
194196
} catch (ClassNotFoundException e) {
195197
logger.log(Logger.LT_INFO, "Could not load the custom HTTP class ");
196198
throw new ClientException(e, false, null);
197199
} catch (IllegalArgumentException e) {
200+
logger.log(Logger.LT_INFO, "Method invoked with Illegal Argument list "+e);
198201
throw new ClientException(e, false, null);
199202
} catch (SecurityException e) {
203+
logger.log(Logger.LT_INFO, "Security Exception "+e);
200204
throw new ClientException(e, false, null);
201205
} catch (InvocationTargetException e) {
206+
logger.log(Logger.LT_INFO, "Exception occured while calling the method "+e);
202207
throw new ClientException(e, false, null);
203208
} catch (NoSuchMethodException e) {
209+
logger.log(Logger.LT_INFO, "Method not found ");
204210
throw new ClientException(e, false, null);
205211
}
206212
}

0 commit comments

Comments
 (0)