CreateNameError() public static method

public static CreateNameError ( string message ) : Exception
message string
return System.Exception
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 3
0
 internal Exception /*!*/ ReadOnlyError(string /*!*/ name)
 {
     return(RubyExceptions.CreateNameError(String.Format("${0} is a read-only variable", name)));
 }
Ejemplo n.º 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")));
 }