|
|
|
@ -25,14 +25,14 @@
@@ -25,14 +25,14 @@
|
|
|
|
|
.ver 0:0:0:0 |
|
|
|
|
} |
|
|
|
|
.module ExceptionHandling.dll |
|
|
|
|
// MVID: {BD40B406-5ECB-4E3A-BB48-79827F1BFB21} |
|
|
|
|
// MVID: {132EAF1E-6B6D-4E21-B000-D06E1A4188E3} |
|
|
|
|
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
|
|
|
|
.imagebase 0x10000000 |
|
|
|
|
.file alignment 0x00000200 |
|
|
|
|
.stackreserve 0x00100000 |
|
|
|
|
.subsystem 0x0003 // WINDOWS_CUI |
|
|
|
|
.corflags 0x00000001 // ILONLY |
|
|
|
|
// Image base: 0x02A10000 |
|
|
|
|
// Image base: 0x03070000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// =============== CLASS MEMBERS DECLARATION =================== |
|
|
|
@ -95,6 +95,191 @@
@@ -95,6 +95,191 @@
|
|
|
|
|
IL_0025: ret |
|
|
|
|
} // end of method ExceptionHandling::ConditionalReturnInThrow |
|
|
|
|
|
|
|
|
|
.method public hidebysig instance bool |
|
|
|
|
SimpleTryCatchException() cil managed |
|
|
|
|
{ |
|
|
|
|
// Code size 54 (0x36) |
|
|
|
|
.maxstack 2 |
|
|
|
|
.locals init (bool V_0) |
|
|
|
|
IL_0000: nop |
|
|
|
|
.try |
|
|
|
|
{ |
|
|
|
|
IL_0001: nop |
|
|
|
|
IL_0002: ldstr "Try" |
|
|
|
|
IL_0007: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_000c: nop |
|
|
|
|
IL_000d: ldarg.0 |
|
|
|
|
IL_000e: newobj instance void [mscorlib]System.Random::.ctor() |
|
|
|
|
IL_0013: callvirt instance int32 [mscorlib]System.Random::Next() |
|
|
|
|
IL_0018: callvirt instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExceptionHandling::B(int32) |
|
|
|
|
IL_001d: stloc.0 |
|
|
|
|
IL_001e: leave.s IL_0034 |
|
|
|
|
|
|
|
|
|
} // end .try |
|
|
|
|
catch [mscorlib]System.Exception |
|
|
|
|
{ |
|
|
|
|
IL_0020: pop |
|
|
|
|
IL_0021: nop |
|
|
|
|
IL_0022: ldstr "CatchException" |
|
|
|
|
IL_0027: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_002c: nop |
|
|
|
|
IL_002d: nop |
|
|
|
|
IL_002e: leave.s IL_0030 |
|
|
|
|
|
|
|
|
|
} // end handler |
|
|
|
|
IL_0030: ldc.i4.0 |
|
|
|
|
IL_0031: stloc.0 |
|
|
|
|
IL_0032: br.s IL_0034 |
|
|
|
|
|
|
|
|
|
IL_0034: ldloc.0 |
|
|
|
|
IL_0035: ret |
|
|
|
|
} // end of method ExceptionHandling::SimpleTryCatchException |
|
|
|
|
|
|
|
|
|
.method public hidebysig instance bool |
|
|
|
|
SimpleTryCatchExceptionWithName() cil managed |
|
|
|
|
{ |
|
|
|
|
// Code size 65 (0x41) |
|
|
|
|
.maxstack 2 |
|
|
|
|
.locals init (bool V_0, |
|
|
|
|
class [mscorlib]System.Exception V_1) |
|
|
|
|
IL_0000: nop |
|
|
|
|
.try |
|
|
|
|
{ |
|
|
|
|
IL_0001: nop |
|
|
|
|
IL_0002: ldstr "Try" |
|
|
|
|
IL_0007: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_000c: nop |
|
|
|
|
IL_000d: ldarg.0 |
|
|
|
|
IL_000e: newobj instance void [mscorlib]System.Random::.ctor() |
|
|
|
|
IL_0013: callvirt instance int32 [mscorlib]System.Random::Next() |
|
|
|
|
IL_0018: callvirt instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExceptionHandling::B(int32) |
|
|
|
|
IL_001d: stloc.0 |
|
|
|
|
IL_001e: leave.s IL_003f |
|
|
|
|
|
|
|
|
|
} // end .try |
|
|
|
|
catch [mscorlib]System.Exception |
|
|
|
|
{ |
|
|
|
|
IL_0020: stloc.1 |
|
|
|
|
IL_0021: nop |
|
|
|
|
IL_0022: ldstr "CatchException ex: " |
|
|
|
|
IL_0027: ldloc.1 |
|
|
|
|
IL_0028: callvirt instance string [mscorlib]System.Object::ToString() |
|
|
|
|
IL_002d: call string [mscorlib]System.String::Concat(string, |
|
|
|
|
string) |
|
|
|
|
IL_0032: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_0037: nop |
|
|
|
|
IL_0038: nop |
|
|
|
|
IL_0039: leave.s IL_003b |
|
|
|
|
|
|
|
|
|
} // end handler |
|
|
|
|
IL_003b: ldc.i4.0 |
|
|
|
|
IL_003c: stloc.0 |
|
|
|
|
IL_003d: br.s IL_003f |
|
|
|
|
|
|
|
|
|
IL_003f: ldloc.0 |
|
|
|
|
IL_0040: ret |
|
|
|
|
} // end of method ExceptionHandling::SimpleTryCatchExceptionWithName |
|
|
|
|
|
|
|
|
|
.method public hidebysig instance bool |
|
|
|
|
SimpleTryCatchExceptionWithNameAndCondition() cil managed |
|
|
|
|
{ |
|
|
|
|
// Code size 101 (0x65) |
|
|
|
|
.maxstack 2 |
|
|
|
|
.locals init (bool V_0, |
|
|
|
|
class [mscorlib]System.Exception V_1, |
|
|
|
|
bool V_2) |
|
|
|
|
IL_0000: nop |
|
|
|
|
.try |
|
|
|
|
{ |
|
|
|
|
IL_0001: nop |
|
|
|
|
IL_0002: ldstr "Try" |
|
|
|
|
IL_0007: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_000c: nop |
|
|
|
|
IL_000d: ldarg.0 |
|
|
|
|
IL_000e: newobj instance void [mscorlib]System.Random::.ctor() |
|
|
|
|
IL_0013: callvirt instance int32 [mscorlib]System.Random::Next() |
|
|
|
|
IL_0018: callvirt instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExceptionHandling::B(int32) |
|
|
|
|
IL_001d: stloc.0 |
|
|
|
|
IL_001e: leave.s IL_0063 |
|
|
|
|
|
|
|
|
|
} // end .try |
|
|
|
|
filter |
|
|
|
|
{ |
|
|
|
|
IL_0020: isinst [mscorlib]System.Exception |
|
|
|
|
IL_0025: dup |
|
|
|
|
IL_0026: brtrue.s IL_002c |
|
|
|
|
|
|
|
|
|
IL_0028: pop |
|
|
|
|
IL_0029: ldc.i4.0 |
|
|
|
|
IL_002a: br.s IL_0042 |
|
|
|
|
|
|
|
|
|
IL_002c: stloc.1 |
|
|
|
|
IL_002d: ldloc.1 |
|
|
|
|
IL_002e: callvirt instance string [mscorlib]System.Exception::get_Message() |
|
|
|
|
IL_0033: ldstr "test" |
|
|
|
|
IL_0038: callvirt instance bool [mscorlib]System.String::Contains(string) |
|
|
|
|
IL_003d: stloc.2 |
|
|
|
|
IL_003e: ldloc.2 |
|
|
|
|
IL_003f: ldc.i4.0 |
|
|
|
|
IL_0040: cgt.un |
|
|
|
|
IL_0042: endfilter |
|
|
|
|
} // end filter |
|
|
|
|
{ // handler |
|
|
|
|
IL_0044: pop |
|
|
|
|
IL_0045: nop |
|
|
|
|
IL_0046: ldstr "CatchException ex: " |
|
|
|
|
IL_004b: ldloc.1 |
|
|
|
|
IL_004c: callvirt instance string [mscorlib]System.Object::ToString() |
|
|
|
|
IL_0051: call string [mscorlib]System.String::Concat(string, |
|
|
|
|
string) |
|
|
|
|
IL_0056: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_005b: nop |
|
|
|
|
IL_005c: nop |
|
|
|
|
IL_005d: leave.s IL_005f |
|
|
|
|
|
|
|
|
|
} // end handler |
|
|
|
|
IL_005f: ldc.i4.0 |
|
|
|
|
IL_0060: stloc.0 |
|
|
|
|
IL_0061: br.s IL_0063 |
|
|
|
|
|
|
|
|
|
IL_0063: ldloc.0 |
|
|
|
|
IL_0064: ret |
|
|
|
|
} // end of method ExceptionHandling::SimpleTryCatchExceptionWithNameAndCondition |
|
|
|
|
|
|
|
|
|
.method public hidebysig instance bool |
|
|
|
|
SimpleTryFinally() cil managed |
|
|
|
|
{ |
|
|
|
|
// Code size 36 (0x24) |
|
|
|
|
.maxstack 1 |
|
|
|
|
.locals init (bool V_0) |
|
|
|
|
IL_0000: nop |
|
|
|
|
.try |
|
|
|
|
{ |
|
|
|
|
IL_0001: nop |
|
|
|
|
IL_0002: ldstr "Try" |
|
|
|
|
IL_0007: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_000c: nop |
|
|
|
|
IL_000d: nop |
|
|
|
|
IL_000e: leave.s IL_001e |
|
|
|
|
|
|
|
|
|
} // end .try |
|
|
|
|
finally |
|
|
|
|
{ |
|
|
|
|
IL_0010: nop |
|
|
|
|
IL_0011: ldstr "Finally" |
|
|
|
|
IL_0016: call void [mscorlib]System.Console::WriteLine(string) |
|
|
|
|
IL_001b: nop |
|
|
|
|
IL_001c: nop |
|
|
|
|
IL_001d: endfinally |
|
|
|
|
} // end handler |
|
|
|
|
IL_001e: ldc.i4.0 |
|
|
|
|
IL_001f: stloc.0 |
|
|
|
|
IL_0020: br.s IL_0022 |
|
|
|
|
|
|
|
|
|
IL_0022: ldloc.0 |
|
|
|
|
IL_0023: ret |
|
|
|
|
} // end of method ExceptionHandling::SimpleTryFinally |
|
|
|
|
|
|
|
|
|
.method family hidebysig specialname rtspecialname |
|
|
|
|
instance void .ctor() cil managed |
|
|
|
|
{ |
|
|
|
|