110,533
社区成员
发帖
与我相关
我的任务
分享
static void F()//
{
try
{
G();
}
catch (Exception e)
{
Console.WriteLine("Expection in F:" + e.Message);
e = new Exception("F");
throw;
}
}
static void G()
{
throw new Exception("G");
}
public static void Main()
{
//Expection
try
{
F();
}
catch (Exception e)
{
Console.WriteLine("Expection in G:" + e.Message);
}
}
static void F()//
{
G();
try
{
// F 自己的代码...
}
catch (Exception e)
{
Console.WriteLine("Expection in F:" + e.Message);
throw new Exception("F");
}
}
static void G()
{
throw new Exception("G");
}
public static void Main()
{
//Expection
try
{
F();
}
catch (Exception e)
{
Console.WriteLine("Expection in G:" + e.Message);
}
}
static void F()//
{
try
{
G();
}
catch (Exception e)
{
Console.WriteLine("Expection in F:" + e.Message);
throw new Exception("F");
}
}
static void G()
{
throw new Exception("G");
}
public static void Main()
{
//Expection
try
{
F();
}
catch (Exception e)
{
Console.WriteLine("Expection in G:" + e.Message);
}
}
static void F()//
{
try
{
G();
}
catch (Exception e)
{
Console.WriteLine("Expection in F:" + e.Message);
throw e;
}
}
static void G()
{
throw new Exception("G");
}
public static void Main()
{
//Expection
try
{
F();
}
catch (Exception e)
{
Console.WriteLine("Expection in G:" + e.Message);
}
}