Exemple #1
0
        private FaultCode CreateFaultCode(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode)
        {
            switch (faultCode)
            {
            case OiosiFaultCode.Sender:
                FaultCode senderInnerFaultCode = CreateSenderFaultCode(innerFaultCode);
                return(FaultCode.CreateSenderFaultCode(senderInnerFaultCode));

            case OiosiFaultCode.Receiver:
                FaultCode recieverInnerFaultCode = CreateRecieverFaultCode(innerFaultCode);
                return(FaultCode.CreateReceiverFaultCode(recieverInnerFaultCode));

            default:
                throw new OiosiMessageFaultUnexpectedFaultCode(faultCode);
            }
        }
Exemple #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="e">exception</param>
        /// <param name="faultCode">fault code</param>
        /// <param name="innerFaultCode">inner fault code</param>
        public OiosiMessageFault(Exception e, OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode)
        {
            StringBuilder reasonMessage    = new StringBuilder();
            Exception     currentException = e;

            do
            {
                reasonMessage.Append(currentException.Message);
                if (currentException.InnerException != null)
                {
                    reasonMessage.Append("\n");
                }
                currentException = currentException.InnerException;
            } while (currentException != null);
            _reason = new FaultReason(reasonMessage.ToString());
            _code   = CreateFaultCode(faultCode, innerFaultCode);
        }
Exemple #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="oiosiFaultCode"></param>
 /// <param name="oiosiInnerFaultCode"></param>
 /// <param name="message">The message</param>
 public InterceptorChannelWrapperException(OiosiFaultCode oiosiFaultCode, OiosiInnerFaultCode oiosiInnerFaultCode, string message)
     : base(oiosiFaultCode, oiosiInnerFaultCode, CreatKeywords(message))
 {
 }
Exemple #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="innerException">The inner exception</param>
 public InterceptorChannelWrapperException(OiosiFaultCode oiosiFaultCode, OiosiInnerFaultCode oiosiInnerFaultCode, Exception innerException)
     : base(oiosiFaultCode, oiosiInnerFaultCode, CreatKeywords(innerException.Message))
 {
 }
Exemple #5
0
 private FaultCode CreateRecieverFaultCode(OiosiInnerFaultCode innerFaultCode)
 {
     return(new FaultCode(innerFaultCode.ToString()));
 }
Exemple #6
0
 private FaultCode CreateSenderFaultCode(OiosiInnerFaultCode innerFaultCode)
 {
     return(new FaultCode((innerFaultCode.ToString())));
 }
Exemple #7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="faultCode"></param>
 /// <param name="innerFaultCode"></param>
 /// <param name="message">The message</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode, string message)
     : base(message)
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }
Exemple #8
0
 /// <summary>
 /// Constructor with faultcode and innerfaultcode
 /// </summary>
 /// <param name="faultCode">rasp message fault code</param>
 /// <param name="innerFaultCode">rasp message innerfault code</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode)
     : base()
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }
Exemple #9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="innerException">The inner exception</param>
 public InterceptorChannelException(Exception innerException) : base(innerException)
 {
     pFaultCode      = OiosiFaultCode.Receiver;
     pInnerFaultCode = OiosiInnerFaultCode.InternalSystemFailureFault;
 }
Exemple #10
0
 /// <summary>
 /// Constructor with faultcode, innerfaultcode, keywords and innerexception
 /// </summary>
 /// <param name="faultCode">rasp message fault code</param>
 /// <param name="innerFaultCode">rasp message innerfault code</param>
 /// <param name="keywords">keywords for the message</param>
 /// <param name="innerException">innerexception of the thrown exception</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode, System.Collections.Generic.Dictionary <string, string> keywords, System.Exception innerException)
     : base(keywords, innerException)
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }
Exemple #11
0
 /// <summary>
 /// Constructor with faultcode, innerfaultcode and innerexception
 /// </summary>
 /// <param name="faultCode">rasp message fault code</param>
 /// <param name="innerFaultCode">rasp message innerfault code</param>
 /// <param name="innerException">innerexception of the thrown exception</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode, System.Exception innerException)
     : base(innerException)
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }