You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
1.0 KiB

using System;
namespace SqlSugar
{
public class Check
{
public static void ThrowNotSupportedException(string message)
{
message = message.IsNullOrEmpty() ? new NotSupportedException().Message : message;
throw new UtilExceptions("SqlSugarException.NotSupportedException:" + message);
}
public static void ArgumentNullException(object checkObj, string message)
{
if (checkObj == null)
throw new UtilExceptions("SqlSugarException.ArgumentNullException:" + message);
}
public static void ArgumentNullException(object [] checkObj, string message)
{
if (checkObj == null|| checkObj.Length==0)
throw new UtilExceptions("SqlSugarException.ArgumentNullException:" + message);
}
public static void Exception(bool isException, string message, params string[] args)
{
if (isException)
throw new UtilExceptions(string.Format(message, args));
}
}
}