CreateNameError() 공개 정적인 메소드

public static CreateNameError ( string message ) : Exception
message string
리턴 System.Exception
예제 #1
0
 public static void CheckConstantName(string name)
 {
     if (!Tokenizer.IsConstantName(name))
     {
         throw RubyExceptions.CreateNameError(String.Format("`{0}' is not allowed as a constant name", name));
     }
 }
예제 #2
0
 public static void CheckInstanceVariableName(string name)
 {
     if (!Tokenizer.IsInstanceVariableName(name))
     {
         throw RubyExceptions.CreateNameError(String.Format("`{0}' is not allowed as an instance variable name", name));
     }
 }
예제 #3
0
 internal Exception /*!*/ ReadOnlyError(string /*!*/ name)
 {
     return(RubyExceptions.CreateNameError(String.Format("${0} is a read-only variable", name)));
 }
예제 #4
0
 public static Exception /*!*/ CreateUndefinedMethodError(RubyModule /*!*/ module, string /*!*/ methodName)
 {
     return(RubyExceptions.CreateNameError(String.Format("undefined method `{0}' for {2} `{1}'",
                                                         methodName, module.Name, module.IsClass ? "class" : "module")));
 }