Esempio n. 1
0
 /// <summary>
 /// Décomposition de l'exception si cette dernière est enrichie
 /// On va extraire le code de l'exception
 /// le degré de sévérité de l'exception
 /// le type d'exception
 /// </summary>
 private void SplitException()
 {
     if (GetExceptionMessage().StartsWith(CCEExceptionUtil.EXCEPTION_TAG_OPEN))
     {
         // Ce message est enrichi
         // par le code, le type et la sévérité du message
         this.ExceptionCode     = CCEExceptionUtil.GetExceptionCode(GetExceptionMessage());
         this.ExceptionSeverity = CCEExceptionUtil.GetExceptionSeverity(GetExceptionMessage());
         this.ExceptionType     = CCEExceptionUtil.GetExceptionType(GetExceptionMessage());
         this.ExceptionMessage  = CCEExceptionUtil.GetExceptionOnlyMessage(GetExceptionMessage());
     }
     else
     {
         // Cette exception n'est pas enrichie
         // On va mettre les valeurs par défaut
         this.ExceptionCode     = CCEExceptionMap.EXCEPTION_CODE_DEFAULT;
         this.ExceptionSeverity = CCEExceptionMap.EXCEPTION_SEVERITY_DEFAULT;
         this.ExceptionType     = CCEExceptionMap.EXCEPTION_TYPE_SYSTEM;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Split exception
 /// </summary>
 private void SplitException()
 {
     if (GetExceptionMessage().StartsWith(CCEExceptionUtil.EXCEPTION_TAG_OPEN))
     {
         // the exception message contains details
         // we will extract the code, severity, type and message
         this.ExceptionCode     = CCEExceptionUtil.GetExceptionCode(GetExceptionMessage());
         this.ExceptionSeverity = CCEExceptionUtil.GetExceptionSeverity(GetExceptionMessage());
         this.ExceptionType     = CCEExceptionUtil.GetExceptionType(GetExceptionMessage());
         this.ExceptionMessage  = CCEExceptionUtil.GetExceptionOnlyMessage(GetExceptionMessage());
     }
     else
     {
         // the exception do not contain details
         // on will put default values
         this.ExceptionCode     = CCEExceptionMap.EXCEPTION_CODE_DEFAULT;
         this.ExceptionSeverity = CCEExceptionMap.EXCEPTION_SEVERITY_DEFAULT;
         this.ExceptionType     = CCEExceptionMap.EXCEPTION_TYPE_SYSTEM;
     }
 }