Esempio n. 1
0
 protected virtual RemoteServiceErrorInfo GetErrorInfo(UserExceptionInformerContext context)
 {
     return(ExceptionToErrorInfoConverter.Convert(context.Exception, options =>
     {
         options.SendExceptionsDetailsToClients = Options.SendExceptionsDetailsToClients;
         options.SendStackTraceToClients = Options.SendStackTraceToClients;
     }));
 }
Esempio n. 2
0
        public async Task InformAsync(UserExceptionInformerContext context)
        {
            var errorInfo = GetErrorInfo(context);

            if (errorInfo.Details.IsNullOrEmpty())
            {
                await MessageService.Error(errorInfo.Message);
            }
            else
            {
                await MessageService.Error(errorInfo.Details, errorInfo.Message);
            }
        }
Esempio n. 3
0
        public void Inform(UserExceptionInformerContext context)
        {
            //TODO: Create sync versions of the MessageService APIs.

            var errorInfo = GetErrorInfo(context);

            if (errorInfo.Details.IsNullOrEmpty())
            {
                MessageService.Error(errorInfo.Message);
            }
            else
            {
                MessageService.Error(errorInfo.Details, errorInfo.Message);
            }
        }
Esempio n. 4
0
 protected virtual RemoteServiceErrorInfo GetErrorInfo(UserExceptionInformerContext context)
 {
     return(ExceptionToErrorInfoConverter.Convert(context.Exception, Options.SendExceptionsDetailsToClients));
 }
Esempio n. 5
0
 public void Inform(UserExceptionInformerContext context)
 {
 }
Esempio n. 6
0
 public Task InformAsync(UserExceptionInformerContext context)
 {
     return(Task.CompletedTask);
 }