在catch块中throw new Exception的意义
throw new Exception(String, Exception)
throw new Exception(String)
throw是明确地抛出异常
throw new Exception("自定义抛出错误的原因").
public doube Division(double a,double b)
{
if(b==0)
{
}
return a/b;
}
throw new Exception(String, Exception)
throw new Exception(String)
throw是明确地抛出异常
throw new Exception("自定义抛出错误的原因").
public doube Division(double a,double b)
{
if(b==0)
{
}
return a/b;
}