IronRuby.Runtime.RubyExceptions.CreateSecurityError C# (CSharp) Method

CreateSecurityError() public static method

public static CreateSecurityError ( string message ) : Exception
message string
return System.Exception
        public static Exception/*!*/ CreateSecurityError(string/*!*/ message, params object[] args) {
            throw new SecurityException(FormatMessage(message, args));
        }

Usage Example

Example #1
0
 public static void CheckSafeLevel(RubyContext /*!*/ context, int level, string /*!*/ method)
 {
     if (level <= context.CurrentSafeLevel)
     {
         throw RubyExceptions.CreateSecurityError(String.Format("Insecure operation {0} at level {1}", method, context.CurrentSafeLevel));
     }
 }
All Usage Examples Of IronRuby.Runtime.RubyExceptions::CreateSecurityError