{"id":192144,"date":"2013-09-01T13:25:02","date_gmt":"2013-09-01T09:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=192144"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=192144","title":{"rendered":"<span class=\"post_title\">\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432 CLR<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u0438\u0432\u0435\u0442, \u0445\u0430\u0431\u0440\u0430\u043b\u044e\u0434\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 CLR, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C# \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041e\u043f\u0440\u043e\u0441 \u0441\u0440\u0435\u0434\u0438 \u043c\u043e\u0438\u0445 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0430 C# \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043e\u043d\u0438 (\u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439) \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e \u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0441\u0435\u043c \u043b\u044e\u0431\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a\u0443 <code>catch<\/code> \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0434\u0430\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u0439\u043c\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c. \u042d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <i>\u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a \u0436\u0435<\/i>, \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 <code>catch<\/code>.<\/p>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u2014 \u043a\u043e\u0434 \u043d\u0430 VB.NET, F#, CIL \u0438 C#, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041e\u0442\u043a\u0443\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u043e\u0448\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<\/h4>\n<p>  \u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432 \u0441\u0440\u0435\u0434\u0443 CLR \u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0435\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d64\/ae9\/5e2\/d64ae95e2a1b49114d82a0aff929e976.png\"\/><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 <code>catch<\/code> CLR \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0431\u0445\u043e\u0434 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 <b>\u0434\u043e<\/b> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 <code>finally<\/code>. \u041c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 VB.NET<\/h5>\n<p>  \u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u044f\u0437\u044b\u043a\u043e\u043c VB.NET. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u044b:<\/p>\n<pre><code class=\"vbscript\">Sub FilterException() \tTry \t\tDim exception As New Exception \t\texception.Data.Add(&quot;foo&quot;, &quot;bar1&quot;)  \t\tConsole.WriteLine(&quot;Throwing&quot;) \t\tThrow exception \tCatch ex As Exception When Filter(ex) ' \u0437\u0434\u0435\u0441\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \t\tConsole.WriteLine(&quot;Caught&quot;) \tFinally \t\tConsole.WriteLine(&quot;Finally&quot;) \tEnd Try  End Sub  Function Filter(exception As Exception) As Boolean \tConsole.WriteLine(&quot;Filtering&quot;) \tReturn exception.Data.Item(&quot;foo&quot;).Equals(&quot;bar&quot;) End Function <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"dos\">Throwing Filtering Caught Finally <\/code><\/pre>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 F#<\/h5>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0430\u0448\u0451\u043b \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 <a href=\"http:\/\/blogs.msdn.com\/b\/dotnet\/archive\/2009\/08\/25\/the-good-and-the-bad-of-exception-filters.aspx\">\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e<\/a> \u043e \u0442\u043e\u043c, \u0447\u0442\u043e F# \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u0427\u0442\u043e \u0436, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043d\u0430 F#<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"scala\">open System  let filter (ex : Exception) =     printfn &quot;Filtering&quot;     ex.Data.[&quot;foo&quot;] :?&gt; string = &quot;bar&quot;  let filterException() =     try         let ex = Exception()         ex.Data.[&quot;foo&quot;] &lt;- &quot;bar&quot;         printfn &quot;Throwing&quot;         raise ex     with \/\/ \u0434\u0430\u043b\u044c\u0448\u0435 \u0444\u0438\u043b\u044c\u0442\u0440     | :? Exception as ex when filter(ex) -&gt; printfn &quot;Caught&quot;  [&lt;EntryPoint&gt;] let main argv =      filterException()     0 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432, \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c <code>catch [mscorlib]System.Object<\/code>. \u041c\u043d\u0435 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 F# \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 CIL<\/h5>\n<p>  CIL (Common Intermediate Language) \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0434\u043b\u044f .NET-\u043c\u0430\u0448\u0438\u043d\u044b. \u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <code>ildasm<\/code>, \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ilasm<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 .NET.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0430 VB.NET, \u043a\u0430\u043a\u0438\u043c \u044f \u0435\u0433\u043e \u0443\u0432\u0438\u0434\u0435\u043b \u0432 <code>ildasm<\/code>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 CIL<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"scala\">.method public static void  FilterException() cil managed {   \/\/ Code size       110 (0x6e)   .maxstack  3   .locals init ([0] class [mscorlib]System.Exception exception,            [1] class [mscorlib]System.Exception ex)   IL_0000:  nop   IL_0001:  nop   .try   {     .try     {       IL_0002:  newobj     instance void [mscorlib]System.Exception::.ctor()       IL_0007:  stloc.0       IL_0008:  ldloc.0       IL_0009:  callvirt   instance class [mscorlib]System.Collections.IDictionary [mscorlib]System.Exception::get_Data()       IL_000e:  ldstr      &quot;foo&quot;       IL_0013:  ldstr      &quot;bar&quot;       IL_0018:  callvirt   instance void [mscorlib]System.Collections.IDictionary::Add(object,                                                                                        object)       IL_001d:  nop       IL_001e:  ldstr      &quot;Throwing&quot;       IL_0023:  call       void [mscorlib]System.Console::WriteLine(string)       IL_0028:  nop       IL_0029:  ldloc.0       IL_002a:  throw       IL_002b:  leave.s    IL_006b     }  \/\/ end .try     filter     {       IL_002d:  isinst     [mscorlib]System.Exception       IL_0032:  dup       IL_0033:  brtrue.s   IL_0039       IL_0035:  pop       IL_0036:  ldc.i4.0       IL_0037:  br.s       IL_0049       IL_0039:  dup       IL_003a:  stloc.1       IL_003b:  call       void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::SetProjectError(class [mscorlib]System.Exception)       IL_0040:  ldloc.1       IL_0041:  call       bool FilterSamples.VbNetFilter::Filter(class [mscorlib]System.Exception)       IL_0046:  ldc.i4.0       IL_0047:  cgt.un       IL_0049:  endfilter     }  \/\/ end filter     {  \/\/ handler       IL_004b:  pop       IL_004c:  ldstr      &quot;Caught&quot;       IL_0051:  call       void [mscorlib]System.Console::WriteLine(string)       IL_0056:  nop       IL_0057:  call       void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::ClearProjectError()       IL_005c:  leave.s    IL_006b     }  \/\/ end handler   }  \/\/ end .try   finally   {     IL_005e:  nop     IL_005f:  ldstr      &quot;Finally&quot;     IL_0064:  call       void [mscorlib]System.Console::WriteLine(string)     IL_0069:  nop     IL_006a:  endfinally   }  \/\/ end handler   IL_006b:  nop   IL_006c:  nop   IL_006d:  ret } \/\/ end of method VbNetFilter::FilterException <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 VB.NET, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043b \u043d\u0430\u0448 \u043a\u043e\u0434 \u0432 \u0432\u0438\u0434\u0435 CIL. \u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0431\u043b\u043e\u043a <code>filter<\/code>:<\/p>\n<pre><code class=\"scala\">filter {   \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c System.Exception:   IL_002d:  isinst     [mscorlib]System.Exception   IL_0032:  dup   IL_0033:  brtrue.s   IL_0039   IL_0035:  pop   IL_0036:  ldc.i4.0   \/\/ \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 - \u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u043c:   IL_0037:  br.s       IL_0049   IL_0039:  dup    \/\/ \u0422\u0443\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432:   IL_003a:  stloc.1   IL_003b:  call       void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::SetProjectError(class [mscorlib]System.Exception)    \/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043a\u0430\u043a \u0444\u0438\u043b\u044c\u0442\u0440:   IL_0040:  ldloc.1   IL_0041:  call       bool FilterSamples.VbNetFilter::Filter(class [mscorlib]System.Exception)   IL_0046:  ldc.i4.0   IL_0047:  cgt.un   IL_0049:  endfilter }  \/\/ end filter <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u043d\u0435\u0441 \u0432 \u0431\u043b\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0442\u0438\u043f\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0437\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u043d\u0430 \u0441\u0442\u0435\u043a\u0435 \u043b\u0435\u0436\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>1<\/code>, \u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u043e\u043c\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u0443 \u0431\u043b\u043e\u043a <code>catch<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d; \u0438\u043d\u0430\u0447\u0435 \u2014 \u043d\u0435\u0442.<\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C# \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u043d\u0435 \u0432\u044b\u043d\u043e\u0441\u0438\u0442 \u0432 \u0431\u043b\u043e\u043a <code>filter<\/code>, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e CIL-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>catch<\/code> \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C# \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <code>filter<\/code> \u0432\u043e\u043e\u0431\u0449\u0435.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.reflection.emit.ilgenerator.beginexceptfilterblock.aspx\">ILGenerator.BeginExceptFilterBlock<\/a> (\u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440).<\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435<\/h5>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 <a href=\"http:\/\/www.jetbrains.com\/decompiler\/\">JetBrains dotPeek 1.1<\/a> \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0440\u0430\u0434\u043e\u0441\u0442\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"cs\">public static void FilterException() {   \/\/ ISSUE: unable to decompile the method. } <\/code><\/pre>\n<p>  <a href=\"http:\/\/www.red-gate.com\/products\/dotnet-development\/reflector\/\">.NET Reflector 8.2<\/a> \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b \u0431\u043e\u043b\u0435\u0435 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u0438 \u0447\u0442\u043e-\u0442\u043e \u0441\u043c\u043e\u0433 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 C#:<\/p>\n<pre><code class=\"cs\">public static void FilterException() {     try     {         Exception exception = new Exception();         exception.Data.Add(&quot;foo&quot;, &quot;bar&quot;);         Console.WriteLine(&quot;Throwing&quot;);         throw exception;     }     catch when (?)     {         Console.WriteLine(&quot;Caught&quot;);         ProjectData.ClearProjectError();     }     finally     {         Console.WriteLine(&quot;Finally&quot;);     } } <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0436, \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u2014 \u0445\u043e\u0442\u044f \u043a\u043e\u0434 \u0438 \u043d\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439, \u043d\u043e \u043f\u043e \u043d\u0435\u043c\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u0432\u0438\u0434\u043d\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u0422\u043e, \u0447\u0442\u043e \u0444\u0438\u043b\u044c\u0442\u0440 \u043d\u0435 \u0431\u044b\u043b \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d, \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 C#-\u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440\u0430. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0432 VB.NET:<\/p>\n<pre><code class=\"vbscript\">Public Shared Sub FilterException()     Try          Dim exception As New Exception         exception.Data.Add(&quot;foo&quot;, &quot;bar&quot;)         Console.WriteLine(&quot;Throwing&quot;)         Throw exception     Catch obj1 As Object When (?)         Console.WriteLine(&quot;Caught&quot;)         ProjectData.ClearProjectError     Finally         Console.WriteLine(&quot;Finally&quot;)     End Try End Sub <\/code><\/pre>\n<p>  \u0423\u0432\u044b, \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u043b\u0430\u0441\u044c \u2014 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0445\u043e\u0442\u044f, \u043a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0432\u044b\u0448\u0435, <code>ildasm<\/code> \u0441 \u044d\u0442\u0438\u043c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f).<\/p>\n<p>  \u041c\u043e\u0433\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043a\u0430 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043a\u043e\u0434\u043e\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 .NET4.5.<\/p>\n<h4>\u0427\u0435\u043c \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 \u0442\u0435\u043b\u0435 \u0431\u043b\u043e\u043a\u0430 <code>catch<\/code><\/h4>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, <i>\u043f\u043e\u0447\u0442\u0438<\/i> \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434\u0443 \u043d\u0430 VB.NET:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043d\u0430 C#<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">static void FilterException() { \ttry \t{ \t\tvar exception = new Exception(); \t\texception.Data[&quot;foo&quot;] = &quot;bar&quot;; \t\tConsole.WriteLine(&quot;Throwing&quot;); \t\tthrow exception; \t} \tcatch (Exception exception) \t{ \t\tif (!Filter(exception)) \t\t{ \t\t\tthrow; \t\t}  \t\tConsole.WriteLine(&quot;Caught&quot;); \t} }  static bool Filter(Exception exception) { \treturn exception.Data[&quot;foo&quot;].Equals(&quot;bar&quot;); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 C# \u0438 VB.NET. \u0412\u0441\u0451 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>throw;<\/code> \u0432 C# \u0442\u0435\u0440\u044f\u0435\u0442 \u0441\u0442\u0435\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (\u0432\u0435\u0440\u043d\u0435\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0437\u0430\u043d\u043e\u0432\u043e). \u0415\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b <code>false<\/code>, \u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u043f\u0430\u0434\u0451\u0442 \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c<\/p>\n<pre><code class=\"dos\">Unhandled Exception: System.Exception: Exception of type 'System.Exception' was thrown.    at CSharpFilter.Program.FilterException() in CSharpFilter\\Program.cs:line 25    at CSharpFilter.Program.Main(String[] args) in CSharpFilter\\Program.cs:line 9 <\/code><\/pre>\n<p>  \u0421\u0443\u0434\u044f \u043f\u043e \u0441\u0442\u0435\u043a\u0443, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430 25 \u0441\u0442\u0440\u043e\u043a\u0435 (\u0441\u0442\u0440\u043e\u043a\u0430 <code>throw;<\/code>), \u0430 \u043d\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 19 (<code>throw exception;<\/code>). \u041a\u043e\u0434 \u043d\u0430 VB.NET \u0432 \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>  \u042d\u0440\u0438\u043a \u041b\u0438\u043f\u043f\u0435\u0440\u0442 \u0432 \u0441\u0432\u043e\u0451\u043c \u0431\u043b\u043e\u0433\u0435 <a href=\"http:\/\/blogs.msdn.com\/b\/ericlippert\/archive\/2004\/09\/01\/224064.aspx\">\u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442<\/a> \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f\u043c\u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.<\/p>\n<p>  \u041a\u043e\u0440\u043e\u0442\u043a\u043e: \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <code>finally<\/code>, \u0442.\u043a. \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0438\u0435\u043c \u0431\u043b\u043e\u043a\u0430 <code>finally<\/code> \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043f\u043e \u0441\u0442\u0435\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 (\u0430 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u044d\u0442\u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u043c\u0443 \u0432\u0437\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f). \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u2014 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 <code>catch<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f <b>\u0434\u043e<\/b> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 <code>finally<\/code>.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0440\u0435\u0434\u043a\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c\u0438 \u043d\u0430 C# \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0441\u0440\u0435\u0434\u044b CLR. \u0421\u0430\u043c \u044f \u043d\u0435 \u043f\u0438\u0448\u0443 \u043d\u0430 VB.NET, \u043d\u043e \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0432\u0441\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c .NET-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u041d\u0443 \u0430 \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0442\u043e \u0432\u0430\u043c \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>  PS. \u041a\u043e\u0434, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0430 github: <a href=\"https:\/\/github.com\/ForNeVeR\/ClrExceptionFilters\">github.com\/ForNeVeR\/ClrExceptionFilters<\/a>.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/192144\/\"> http:\/\/habrahabr.ru\/post\/192144\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u0438\u0432\u0435\u0442, \u0445\u0430\u0431\u0440\u0430\u043b\u044e\u0434\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 CLR, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C# \u2014 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041e\u043f\u0440\u043e\u0441 \u0441\u0440\u0435\u0434\u0438 \u043c\u043e\u0438\u0445 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0430 C# \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043e\u043d\u0438 (\u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439) \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e \u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0441\u0435\u043c \u043b\u044e\u0431\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a\u0443 <code>catch<\/code> \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0434\u0430\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u0439\u043c\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c. \u042d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <i>\u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a \u0436\u0435<\/i>, \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 <code>catch<\/code>.<\/p>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u2014 \u043a\u043e\u0434 \u043d\u0430 VB.NET, F#, CIL \u0438 C#, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-192144","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=192144"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192144\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}