/// <summary> /// Throws exception or writes error and returns false. /// </summary> /// <param name="format">Error message format string. See <see cref="System.String.Format"/> for details.</param> /// <param name="args">Format string arguments</param> /// <returns>Always false.</returns> public static bool Throw(string format, params object[] args) { if (exceptionEnabled) { throw new ScriptErrorException(format, args); } else { UO.PrintError(format, args); return(false); } }
/// <summary> /// Throws exception or writes error and returns false. /// </summary> /// <param name="message">Error message.</param> /// <returns>Always false.</returns> public static bool Throw(string message) { if (exceptionEnabled) { throw new ScriptErrorException(message); } else { UO.PrintError(message); return(false); } }