コード例 #1
0
 private static string LookupReason(NoTokenReason reason)
 {
     if (reason == NoTokenReason.EndOfString)
     {
         return("End of string");
     }
     else
     {
         throw new ArgumentException("Unknown reason: " + reason);
     }
 }
コード例 #2
0
 private static string LookupReason(NoTokenReason reason)
 {
     if(reason == NoTokenReason.EndOfString)
     {
         return "End of string";
     }
     else
     {
         throw new ArgumentException("Unknown reason: " + reason);
     }
 }
コード例 #3
0
 /// <summary>
 /// Creates an exception given a message and a reason why no token was provided
 /// </summary>
 /// <param name="msg">The exception message</param>
 /// <param name="reason">The reason why no token was provided</param>
 public DocumentRenderException(string msg, NoTokenReason reason)
     : base(msg + ": " + LookupReason(reason))
 {
 }
コード例 #4
0
 /// <summary>
 /// Creates an exception given a message and a reason why no token was provided
 /// </summary>
 /// <param name="msg">The exception message</param>
 /// <param name="reason">The reason why no token was provided</param>
 public DocumentRenderException(string msg, NoTokenReason reason) : base(msg + ": " + LookupReason(reason))
 {
 }