Commit 838a95b7 authored by Kishore Battula's avatar Kishore Battula
Browse files

Merge branch 'haaggarw/AddingTryCatchBlock' into 'master'

Azure - Adding Stack Traces in Logs

See merge request !26
parents 82670636 cf46c1e9
Pipeline #19489 failed with stages
in 39 minutes and 43 seconds
......@@ -39,7 +39,7 @@ public class JwtTokenGenerator implements UserCredential {
}
catch (UnsupportedEncodingException e) {
LOGGER.error(e.getMessage());
LOGGER.error(e.getMessage(), e);
throw new ApplicationException(e.getMessage(), e.getCause());
}
......
......@@ -48,12 +48,12 @@ public class ProcessWKSTransform {
LOGGER.info("Transformation completed for message with id: " + message.getMessageId());
} catch (BadRequestException e) {
LOGGER.error("Bad Request Reason: {}, pubsub message id: {}", e.getErrorMsg(),
message.getMessageId());
message.getMessageId(), e);
} catch (ApplicationException e) {
LOGGER.error("Application Error Reason: {}, pubsub message id: {}", e.getErrorMsg(),
message.getMessageId());
message.getMessageId(), e);
} catch (NullPointerException e) {
LOGGER.error("Invalid format for message with id: {}", message.getMessageId());
LOGGER.error("Invalid format for message with id: {}", message.getMessageId(), e);
}
catch (Exception e) {
LOGGER.error("Exception encountered processing the message with id: {}", message.getMessageId(), e);
......
......@@ -41,8 +41,14 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
ExecutorService executorService = Executors
.newFixedThreadPool(Integer.parseUnsignedInt(azureBootstrapConfig.getNThreads()));
for (String partition : tenantList) {
SubscriptionClient subscriptionClient = this.subscriptionClientFactory.getSubscriptionClient(partition);
registerMessageHandler(subscriptionClient, executorService);
try {
SubscriptionClient subscriptionClient = this.subscriptionClientFactory.getSubscriptionClient(partition);
registerMessageHandler(subscriptionClient, executorService);
}
catch (Exception e) {
LOGGER.error("Error while creating or registering subscription client", e);
}
}
}
......@@ -55,7 +61,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
executorService);
} catch (InterruptedException | ServiceBusException e) {
LOGGER.error("Error registering message handler {}", e.getMessage());
LOGGER.error("Error registering message handler {}", e.getMessage(), e);
}
}
......
......@@ -81,7 +81,7 @@ public class MappingStoreImpl implements MappingStore {
mappingsList.add(mapper.readValue(content, MappingsModel.class));
} catch (Exception e) {
LOGGER.error("Error while processing mappings from blob store {}", e.getMessage());
LOGGER.error("Error while processing mappings from blob store {}", e.getMessage(), e);
}
}
return mappingsList;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment