///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { LoadMultipleStudiesException exception = (LoadMultipleStudiesException) e; exceptionHandlingContext.Log(LogLevel.Error, e); exceptionHandlingContext.ShowMessageBox(exception.GetUserMessage()); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { LoadMultipleStudiesException exception = (LoadMultipleStudiesException)e; exceptionHandlingContext.Log(LogLevel.Error, e); exceptionHandlingContext.ShowMessageBox(exception.GetUserMessage()); }
private static void Handle(LoadSopsException e, IExceptionHandlingContext exceptionHandlingContext) { string message; if (e is InUseLoadStudyException) { message = SR.MessageLoadStudyFailedInUse; } else if (e is NearlineLoadStudyException) { message = ((NearlineLoadStudyException) e).IsStudyBeingRestored ? SR.MessageLoadStudyFailedNearline : String.Format("{0} {1}", SR.MessageLoadStudyFailedNearlineNoRestore, SR.MessageContactPacsAdmin); } else if (e is OfflineLoadStudyException) { message = SR.MessageLoadStudyFailedOffline; } else if (e is NotFoundLoadStudyException) { message = SR.MessageLoadStudyFailedNotFound; } else { if (e.PartiallyLoaded) message = String.Format(SR.MessageFormatLoadStudyIncomplete, e.Successful, e.Total); else message = SR.MessageLoadStudyCompleteFailure; message = String.Format("{0} {1}", message, SR.MessageContactPacsAdmin); } exceptionHandlingContext.ShowMessageBox(message); }
private static void Handle(LoadSopsException e, IExceptionHandlingContext exceptionHandlingContext) { string message; if (e is InUseLoadStudyException) { message = SR.MessageLoadStudyFailedInUse; } else if (e is NearlineLoadStudyException) { message = ((NearlineLoadStudyException) e).IsStudyBeingRestored ? SR.MessageLoadStudyFailedNearline : String.Format("{0} {1}", SR.MessageLoadStudyFailedNearlineNoRestore, SR.MessageContactPacsAdmin); } else if (e is OfflineLoadStudyException) { message = SR.MessageLoadStudyFailedOffline; } else if (e is NotFoundLoadStudyException) { message = SR.MessageLoadStudyFailedNotFound; } else { if (e.PartiallyLoaded) message = String.Format(SR.MessageFormatLoadStudyIncomplete, e.Successful, e.Total); else message = SR.MessageLoadStudyCompleteFailure; message = String.Format("{0} {1}", message, SR.MessageContactPacsAdmin); } exceptionHandlingContext.ShowMessageBox(message); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { if (e is DisplaySetCloningException) exceptionHandlingContext.ShowMessageBox(SR.MessageErrorCloningDisplaySet); else exceptionHandlingContext.ShowMessageBox(SR.MessageErrorCloningPresentationImage); }
private static void Handle(LoadPriorStudiesException exception, IExceptionHandlingContext context) { if (exception.FindFailed) { context.ShowMessageBox(SR.MessageLoadPriorsFindErrors); return; } var summary = new StringBuilder(); if (!exception.FindResultsComplete) summary.Append(SR.MessagePriorsIncomplete); if (ShouldShowLoadErrorMessage(exception)) { if (summary.Length > 0) { summary.AppendLine(); summary.AppendLine("----"); summary.AppendLine(); } summary.Append(ClearCanvas.Web.Services.ExceptionTranslator.Translate(exception)); } if (summary.Length > 0) context.ShowMessageBox(summary.ToString()); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { if (e is DisplaySetCloningException) exceptionHandlingContext.ShowMessageBox(SR.MessageErrorCloningDisplaySet); else exceptionHandlingContext.ShowMessageBox(SR.MessageErrorCloningPresentationImage); }
private static void Handle(LoadPriorStudiesException exception, IExceptionHandlingContext context) { if (exception.FindFailed) { context.ShowMessageBox(SR.MessageLoadPriorsFindErrors); return; } var summary = new StringBuilder(); if (!exception.FindResultsComplete) { summary.Append(SR.MessagePriorsIncomplete); } if (ShouldShowLoadErrorMessage(exception)) { if (summary.Length > 0) { summary.AppendLine(); summary.AppendLine("----"); summary.AppendLine(); } summary.Append(Macro.Web.Services.ExceptionTranslator.Translate(exception)); } if (summary.Length > 0) { context.ShowMessageBox(summary.ToString()); } }
public void Handle(Exception ex, IExceptionHandlingContext exceptionHandlingContext) { StringBuilder sb = new StringBuilder(); sb.AppendLine(SR.ErrorPathUnavailable); sb.AppendLine(string.Format(SR.FormatPath, ((PathNotFoundException)ex).Path)); exceptionHandlingContext.ShowMessageBox(sb.ToString()); }
public void Handle(Exception e, IExceptionHandlingContext context) { // log this as an error context.Log(LogLevel.Error, e); // report to user context.ShowMessageBox(SR.MessageTimeout, true); }
public void Handle(Exception e, IExceptionHandlingContext context) { // only log this if debugging context.Log(LogLevel.Debug, e); // report to user context.ShowMessageBox(e.Message, true); }
public void Handle(Exception e, IExceptionHandlingContext context) { // only log this if debugging context.Log(LogLevel.Debug, e); // report to user context.ShowMessageBox(e.Message, true); }
public void Handle(Exception e, IExceptionHandlingContext context) { // log this as an error context.Log(LogLevel.Error, e); // report to user context.ShowMessageBox(SR.MessageTimeout, true); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { exceptionHandlingContext.Log(LogLevel.Error, e); if (e is LoadSopsException) Handle((LoadSopsException)e, exceptionHandlingContext); else if (e is StudyLoaderNotFoundException) Handle((StudyLoaderNotFoundException)e, exceptionHandlingContext); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { exceptionHandlingContext.Log(LogLevel.Error, e); if (e is LoadSopsException) Handle((LoadSopsException)e, exceptionHandlingContext); else if (e is StudyLoaderNotFoundException) Handle((StudyLoaderNotFoundException)e, exceptionHandlingContext); }
public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { if (e is LoadPriorStudiesException) { exceptionHandlingContext.Log(LogLevel.Error, e); Handle(e as LoadPriorStudiesException, exceptionHandlingContext); } }
public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { if (e is LoadPriorStudiesException) { exceptionHandlingContext.Log(LogLevel.Error, e); Handle(e as LoadPriorStudiesException, exceptionHandlingContext); } }
public void Handle(Exception e, IExceptionHandlingContext context) { context.Log(LogLevel.Debug, e); context.ShowMessageBox(SR.MessageAccessDenied, true); // this exception is not recoverable // (well, technically it is, but we don't want to encourage retries !!!) context.Abort(); }
public void Handle(Exception ex, IExceptionHandlingContext exceptionHandlingContext) { if (ex is PathNotFoundException) { Handle((PathNotFoundException)ex, exceptionHandlingContext); } else if (ex is PathAccessException) { Handle((PathAccessException)ex, exceptionHandlingContext); } }
public void Handle(Exception e, IExceptionHandlingContext context) { // only log this if debugging context.Log(LogLevel.Debug, e); // report to user context.ShowMessageBox(SR.MessageConcurrentModification, true); // this exception is not recoverable context.Abort(); }
private static void Handle(PathAccessException ex, IExceptionHandlingContext exceptionHandlingContext) { var sb = new StringBuilder(); sb.AppendLine(SR.ErrorPathSecurity); if (!string.IsNullOrEmpty(ex.Path)) { sb.AppendLine(string.Format(SR.FormatPath, ex.Path)); } exceptionHandlingContext.ShowMessageBox(sb.ToString()); }
public void Handle(Exception e, IExceptionHandlingContext context) { context.Log(LogLevel.Error, e); // if we're known to be in offline mode, then communicate this, otherwise // just report a generic communication error context.ShowMessageBox( Desktop.Application.SessionStatus == SessionStatus.Offline ? SR.MessageEndpointNotFoundOfflineMode : SR.MessageCommunicationError, true); }
public void Handle(Exception e, IExceptionHandlingContext context) { // only log this if debugging context.Log(LogLevel.Debug, e); // report to user context.ShowMessageBox(SR.MessageConcurrentModification, true); // this exception is not recoverable context.Abort(); }
private static void Handle(LoadPriorStudiesException exception, IExceptionHandlingContext context) { if (exception.FindFailed) { lock (_lock) { if (!_mostRecentQuerySuccessful && (!_everShownPriorsMessage || _successfulQuerySinceLastPriorsMessage)) { context.ShowMessageBox(SR.MessageSearchForPriorsFailed); _everShownPriorsMessage = true; _successfulQuerySinceLastPriorsMessage = false; } } return; } var summary = new StringBuilder(); if (!exception.FindResultsComplete) { lock (_lock) { if (!_mostRecentQuerySuccessful && (!_everShownPriorsMessage || _successfulQuerySinceLastPriorsMessage)) { summary.Append(SR.MessagePriorsIncomplete); _everShownPriorsMessage = true; _successfulQuerySinceLastPriorsMessage = false; } } } if (ShouldShowLoadErrorMessage(exception)) { if (summary.Length > 0) { summary.AppendLine(); summary.AppendLine("----"); summary.AppendLine(); } summary.AppendLine(SR.MessageLoadPriorsErrorPrefix); summary.Append(exception.GetExceptionSummary()); } if (summary.Length > 0) { context.ShowMessageBox(summary.ToString()); } }
public void Handle(Exception e, IExceptionHandlingContext context) { try { // typically this means authentication failed, which is usually because the session is no longer valid // so inform the desktop of the situation Desktop.Application.InvalidateSession(); } catch (Exception) { // if we get another exception attempting to renew the login, then we just log the original exception // and inform user that there is a problem communicating with server context.Log(LogLevel.Error, e); context.ShowMessageBox(SR.MessageCommunicationError, true); } }
private static void Handle(LoadPriorStudiesException exception, IExceptionHandlingContext context) { if (exception.FindFailed) { lock (_lock) { if (!_mostRecentQuerySuccessful && (!_everShownPriorsMessage || _successfulQuerySinceLastPriorsMessage)) { context.ShowMessageBox(SR.MessageSearchForPriorsFailed); _everShownPriorsMessage = true; _successfulQuerySinceLastPriorsMessage = false; } } return; } var summary = new StringBuilder(); if (!exception.FindResultsComplete) { lock (_lock) { if (!_mostRecentQuerySuccessful && (!_everShownPriorsMessage || _successfulQuerySinceLastPriorsMessage)) { summary.Append(SR.MessagePriorsIncomplete); _everShownPriorsMessage = true; _successfulQuerySinceLastPriorsMessage = false; } } } if (ShouldShowLoadErrorMessage(exception)) { if (summary.Length > 0) { summary.AppendLine(); summary.AppendLine("----"); summary.AppendLine(); } summary.AppendLine(SR.MessageLoadPriorsErrorPrefix); summary.Append(exception.GetExceptionSummary()); } if (summary.Length > 0) context.ShowMessageBox(summary.ToString()); }
public void Handle(Exception ex, IExceptionHandlingContext exceptionHandlingContext) { var message = SR.MessageVolumeSourceUnexpectedException; if (ex is InsufficientFramesException) { message = SR.MessageVolumeSourceMinimumThreeImages; } else if (ex is UnsupportedSourceImagesException) { message = SR.MessageVolumeSourceAreNotSupported; } else if (ex is UnsupportedPixelFormatSourceImagesException) { message = SR.MessageVolumeSourceMustBe16BitGreyscale; } else if (ex is MultipleFramesOfReferenceException) { message = SR.MessageVolumeSourceMustBeSingleFrameOfReference; } else if (ex is MultipleImageOrientationsException) { message = SR.MessageVolumeSourceMustBeSameImageOrientationPatient; } else if (ex is MultipleSourceSeriesException) { message = SR.MessageVolumeSourceMustBeSingleSeries; } else if (ex is NullFrameOfReferenceException) { message = SR.MessageVolumeSourceMustSpecifyFrameOfReference; } else if (ex is NullImageOrientationException) { message = SR.MessageVolumeSourceMustDefineImageOrientationPatient; } else if (ex is NullSourceSeriesException) { message = SR.MessageVolumeSourceMustBeSingleSeries; } else if (ex is UnevenlySpacedFramesException) { message = SR.MessageVolumeSourceMustBeEvenlySpacedForMpr; } else if (ex is UncalibratedFramesException) { message = SR.MessageVolumeSourceMustBeCalibrated; } else if (ex is AnisotropicPixelAspectRatioException) { message = SR.MessageVolumeSourceMayNotHaveAnisotropicPixels; } else if (ex is UnsupportedGantryTiltAxisException) { message = SR.MessageVolumeSourceMayBotBeGantrySlewed; } else if (ex is InconsistentRescaleFunctionTypeException) { message = SR.MessageVolumeSourceInconsistentRescaleUnits; } else if (ex is InconsistentImageLateralityException) { message = SR.MessageVolumeSourceInconsistentImageLaterality; } exceptionHandlingContext.ShowMessageBox(message); }
public void Handle(Exception e, IExceptionHandlingContext context) { context.Log(LogLevel.Error, e); // if we're known to be in offline mode, then communicate this, otherwise // just report a generic communication error context.ShowMessageBox( Desktop.Application.SessionStatus == SessionStatus.Offline ? SR.MessageEndpointNotFoundOfflineMode : SR.MessageCommunicationError, true); }
public void Handle(Exception ex, IExceptionHandlingContext exceptionHandlingContext) { var message = SR.MessageVolumeSourceUnexpectedException; if (ex is InsufficientFramesException) message = SR.MessageVolumeSourceMinimumThreeImages; else if (ex is UnsupportedSourceImagesException) message = SR.MessageVolumeSourceAreNotSupported; else if (ex is UnsupportedPixelFormatSourceImagesException) message = SR.MessageVolumeSourceMustBe16BitGreyscale; else if (ex is MultipleFramesOfReferenceException) message = SR.MessageVolumeSourceMustBeSingleFrameOfReference; else if (ex is MultipleImageOrientationsException) message = SR.MessageVolumeSourceMustBeSameImageOrientationPatient; else if (ex is MultipleSourceSeriesException) message = SR.MessageVolumeSourceMustBeSingleSeries; else if (ex is NullFrameOfReferenceException) message = SR.MessageVolumeSourceMustSpecifyFrameOfReference; else if (ex is NullImageOrientationException) message = SR.MessageVolumeSourceMustDefineImageOrientationPatient; else if (ex is NullSourceSeriesException) message = SR.MessageVolumeSourceMustBeSingleSeries; else if (ex is UnevenlySpacedFramesException) message = SR.MessageVolumeSourceMustBeEvenlySpacedForMpr; else if (ex is UncalibratedFramesException) message = SR.MessageVolumeSourceMustBeCalibrated; else if (ex is AnisotropicPixelAspectRatioException) message = SR.MessageVolumeSourceMayNotHaveAnisotropicPixels; else if (ex is UnsupportedGantryTiltAxisException) message = SR.MessageVolumeSourceMayBotBeGantrySlewed; else if (ex is InconsistentRescaleFunctionTypeException) message = SR.MessageVolumeSourceInconsistentRescaleUnits; else if (ex is InconsistentImageLateralityException) message = SR.MessageVolumeSourceInconsistentImageLaterality; exceptionHandlingContext.ShowMessageBox(message); }
public void Handle(Exception e, IExceptionHandlingContext context) { try { // typically this means authentication failed, which is usually because the session is no longer valid // so inform the desktop of the situation Desktop.Application.InvalidateSession(); } catch (Exception) { // if we get another exception attempting to renew the login, then we just log the original exception // and inform user that there is a problem communicating with server context.Log(LogLevel.Error, e); context.ShowMessageBox(SR.MessageCommunicationError, true); } }
public void Handle(Exception e, IExceptionHandlingContext context) { context.Log(LogLevel.Error, e); context.ShowMessageBox(e.Message, true); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { exceptionHandlingContext.Log(LogLevel.Error, e); exceptionHandlingContext.ShowMessageBox(SR.MessageNoVisibleDisplaySets); }
public void Handle(Exception ex, IExceptionHandlingContext exceptionHandlingContext) { string message = SR.MessageUnexpectedCreateVolumeException; if (ex is InsufficientFramesException) { message = SR.MessageSourceDataSetNeedsThreeImagesForMpr; } else if (ex is UnsupportedSourceImagesException) { message = SR.MessageSourceDataSetImagesAreNotSupported; } else if (ex is UnsupportedPixelFormatSourceImagesException) { message = SR.MessageSourceDataSetImagesMustBe16BitGreyscale; } else if (ex is UnsupportedMultiFrameSourceImagesException) { message = SR.MessageSourceDataSetMultiFrameImagesAreNotSupported; } else if (ex is MultipleFramesOfReferenceException) { message = SR.MessageSourceDataSetMustBeSingleFrameOfReference; } else if (ex is MultipleImageOrientationsException) { message = SR.MessageSourceDataSetMustBeSameImageOrientationPatient; } else if (ex is MultipleSourceSeriesException) { message = SR.MessageSourceDataSetMustBeSingleSeries; } else if (ex is NullFrameOfReferenceException) { message = SR.MessageSourceDataSetMustSpecifyFrameOfReference; } else if (ex is NullImageOrientationException) { message = SR.MessageSourceDataSetMustDefineImageOrientationPatient; } else if (ex is NullSourceSeriesException) { message = SR.MessageSourceDataSetMustBeSingleSeries; } else if (ex is UnevenlySpacedFramesException) { message = SR.MessageSourceDataSetImagesMustBeEvenlySpacedForMpr; } else if (ex is UncalibratedFramesException) { message = SR.MessageSourceDataSetImagesMustBeCalibrated; } else if (ex is AnisotropicPixelAspectRatioException) { message = SR.MessageSourceDataSetImagesMayNotHaveAnisotropicPixels; } else if (ex is UnsupportedGantryTiltAxisException) { message = SR.MessageSourceDataSetImagesMayBotBeGantrySlewed; } exceptionHandlingContext.ShowMessageBox(message); }
///<summary> /// Handles the specified exception. ///</summary> public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { exceptionHandlingContext.Log(LogLevel.Error, e); exceptionHandlingContext.ShowMessageBox(SR.MessageNoVisibleDisplaySets); }
public void Handle(Exception e, IExceptionHandlingContext context) { context.Log(LogLevel.Error, e); context.ShowMessageBox(SR.MessageCommunicationError, true); }
public void Handle(Exception ex, IExceptionHandlingContext exceptionHandlingContext) { string message = SR.MessageUnexpectedCreateVolumeException; if (ex is InsufficientFramesException) message = SR.MessageSourceDataSetNeedsThreeImagesForMpr; else if (ex is UnsupportedSourceImagesException) message = SR.MessageSourceDataSetImagesAreNotSupported; else if (ex is UnsupportedPixelFormatSourceImagesException) message = SR.MessageSourceDataSetImagesMustBe16BitGreyscale; else if (ex is UnsupportedMultiFrameSourceImagesException) message = SR.MessageSourceDataSetMultiFrameImagesAreNotSupported; else if (ex is MultipleFramesOfReferenceException) message = SR.MessageSourceDataSetMustBeSingleFrameOfReference; else if (ex is MultipleImageOrientationsException) message = SR.MessageSourceDataSetMustBeSameImageOrientationPatient; else if (ex is MultipleSourceSeriesException) message = SR.MessageSourceDataSetMustBeSingleSeries; else if (ex is NullFrameOfReferenceException) message = SR.MessageSourceDataSetMustSpecifyFrameOfReference; else if (ex is NullImageOrientationException) message = SR.MessageSourceDataSetMustDefineImageOrientationPatient; else if (ex is NullSourceSeriesException) message = SR.MessageSourceDataSetMustBeSingleSeries; else if (ex is UnevenlySpacedFramesException) message = SR.MessageSourceDataSetImagesMustBeEvenlySpacedForMpr; else if (ex is UncalibratedFramesException) message = SR.MessageSourceDataSetImagesMustBeCalibrated; else if (ex is AnisotropicPixelAspectRatioException) message = SR.MessageSourceDataSetImagesMayNotHaveAnisotropicPixels; else if (ex is UnsupportedGantryTiltAxisException) message = SR.MessageSourceDataSetImagesMayBotBeGantrySlewed; exceptionHandlingContext.ShowMessageBox(message); }
public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { exceptionHandlingContext.ShowMessageBox(e.GetType().FullName); }
public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { //We told the viewer automation service to handle showing contract fault //messages to the user, so we just log the exception. Platform.Log(LogLevel.Info, e); }
public void Handle(Exception e, IExceptionHandlingContext context) { context.Log(LogLevel.Debug, e); context.ShowMessageBox(SR.MessageAccessDenied, true); // this exception is not recoverable // (well, technically it is, but we don't want to encourage retries !!!) context.Abort(); }
private static void Handle(StudyLoaderNotFoundException e, IExceptionHandlingContext exceptionHandlingContext) { String message = String.Format("{0} {1}", SR.MessageLoadStudyCompleteFailure, SR.MessageContactPacsAdmin); exceptionHandlingContext.ShowMessageBox(message); }
private static void Handle(StudyLoaderNotFoundException e, IExceptionHandlingContext exceptionHandlingContext) { String message = String.Format("{0} {1}", SR.MessageLoadStudyCompleteFailure, SR.MessageContactPacsAdmin); exceptionHandlingContext.ShowMessageBox(message); }
public void Handle(Exception e, IExceptionHandlingContext exceptionHandlingContext) { //We told the viewer automation service to handle showing contract fault //messages to the user, so we just log the exception. Platform.Log(LogLevel.Info, e); }