Exemplo n.º 1
0
 public static string GenerateThrowExceptionClause(
     DpdtExceptionTypeEnum exceptionType,
     string message
     )
 {
     return
         ($"throw new {typeof(DpdtException).FullName}({nameof(DpdtExceptionTypeEnum)}.{exceptionType}, \"{message}\");");
 }
Exemplo n.º 2
0
 public static string GenerateThrowExceptionClause2(
     DpdtExceptionTypeEnum exceptionType,
     string message,
     string additionalInformation
     )
 {
     return
         ($"throw new {typeof(DpdtException).FullName}({nameof(DpdtExceptionTypeEnum)}.{exceptionType}, {message}, {additionalInformation});");
 }
Exemplo n.º 3
0
 public DpdtException(DpdtExceptionTypeEnum type, string message, Exception innerException, string additionalArgument = "")
     : base(message, innerException)
 {
     Type = type;
     AdditionalArgument = additionalArgument;
 }