Do not log the exception trace when upload fails by user abort action
Signed-off-by: Asharani <asharani.murugesh@in.bosch.com>
This commit is contained in:
@@ -250,7 +250,7 @@ public class UploadHandler implements StreamVariable, Receiver, SucceededListene
|
|||||||
// uploadStarted method
|
// uploadStarted method
|
||||||
if (!uploadInterrupted) {
|
if (!uploadInterrupted) {
|
||||||
if (aborted) {
|
if (aborted) {
|
||||||
LOG.error("User aborted file upload");
|
LOG.info("User aborted file upload for file : {}", fileName);
|
||||||
failureReason = i18n.get("message.uploadedfile.aborted");
|
failureReason = i18n.get("message.uploadedfile.aborted");
|
||||||
interruptFileUpload();
|
interruptFileUpload();
|
||||||
return;
|
return;
|
||||||
@@ -275,7 +275,7 @@ public class UploadHandler implements StreamVariable, Receiver, SucceededListene
|
|||||||
@Override
|
@Override
|
||||||
public void onProgress(final StreamingProgressEvent event) {
|
public void onProgress(final StreamingProgressEvent event) {
|
||||||
if (aborted) {
|
if (aborted) {
|
||||||
LOG.error("User aborted the upload");
|
LOG.info("User aborted the upload for file : {}", event.getFileName());
|
||||||
failureReason = i18n.get("message.uploadedfile.aborted");
|
failureReason = i18n.get("message.uploadedfile.aborted");
|
||||||
interruptFileStreaming();
|
interruptFileStreaming();
|
||||||
return;
|
return;
|
||||||
@@ -300,14 +300,16 @@ public class UploadHandler implements StreamVariable, Receiver, SucceededListene
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void streamingFailed(final StreamingErrorEvent event) {
|
public void streamingFailed(final StreamingErrorEvent event) {
|
||||||
LOG.info("Streaming failed for file :{}", event.getFileName());
|
|
||||||
if (failureReason == null) {
|
if (failureReason == null) {
|
||||||
failureReason = event.getException().getMessage();
|
failureReason = event.getException().getMessage();
|
||||||
}
|
}
|
||||||
eventBus.publish(this, new UploadStatusEvent(UploadStatusEventType.UPLOAD_STREAMING_FAILED,
|
eventBus.publish(this, new UploadStatusEvent(UploadStatusEventType.UPLOAD_STREAMING_FAILED,
|
||||||
new UploadFileStatus(fileName, failureReason, selectedSw)));
|
new UploadFileStatus(fileName, failureReason, selectedSw)));
|
||||||
|
|
||||||
LOG.info("Streaming failed due to :{}", event.getException());
|
if (!aborted) {
|
||||||
|
LOG.info("Streaming failed for file :{}", event.getFileName());
|
||||||
|
LOG.info("Streaming failed due to :{}", event.getException());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -317,13 +319,15 @@ public class UploadHandler implements StreamVariable, Receiver, SucceededListene
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void uploadFailed(final FailedEvent event) {
|
public void uploadFailed(final FailedEvent event) {
|
||||||
LOG.info("Upload failed for file :{}", event.getFilename());
|
|
||||||
if (failureReason == null) {
|
if (failureReason == null) {
|
||||||
failureReason = event.getReason().getMessage();
|
failureReason = event.getReason().getMessage();
|
||||||
}
|
}
|
||||||
eventBus.publish(this, new UploadStatusEvent(UploadStatusEventType.UPLOAD_FAILED, new UploadFileStatus(
|
eventBus.publish(this, new UploadStatusEvent(UploadStatusEventType.UPLOAD_FAILED, new UploadFileStatus(
|
||||||
fileName, failureReason, selectedSwForUpload)));
|
fileName, failureReason, selectedSwForUpload)));
|
||||||
LOG.info("Upload failed for file :{}", event.getReason());
|
if (!aborted) {
|
||||||
|
LOG.info("Upload failed for file :{}", event.getFilename());
|
||||||
|
LOG.info("Upload failed for file :{}", event.getReason());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user