if (message.equals("throwRuntime")) {
throw new RuntimeException("Requested");
} else {
try {
SimpleExceptionErrorCodeEnum errCode = SimpleExceptionErrorCodeEnum.valueOf(message.toUpperCase(Locale.ENGLISH));
throw new SimpleException(response, errCode, message);
}
catch (IllegalArgumentException e) {
try {
WotsitExceptionErrorCodeEnum errCode = WotsitExceptionErrorCodeEnum.valueOf(message.toUpperCase(Locale.ENGLISH));
throw new WotsitException(e,
response,
errCode, (message.hashCode() % 2) != 0 ? WotsitExceptionTypeEnum.CHEESY : WotsitExceptionTypeEnum.SPICY,
String.valueOf(responseCode));
}
catch (IllegalArgumentException ex) {
}
throw new SimpleException(e,response, SimpleExceptionErrorCodeEnum.NULL, message);
}
}
}