Merge pull request #347 from JamesB7/master
[mono.git] / mcs / class / Mono.Debugger.Soft / Mono.Debugger.Soft / ILExceptionHandler.cs
1 using System;
2 using System.IO;
3
4 namespace Mono.Debugger.Soft
5 {
6         public enum ILExceptionHandlerType
7         {
8                 Catch = ExceptionClauseFlags.None,
9                 Filter = ExceptionClauseFlags.Filter,
10                 Finally = ExceptionClauseFlags.Finally,
11                 Fault = ExceptionClauseFlags.Fault,
12         }
13
14         public class ILExceptionHandler
15         {
16                 public int TryOffset { get; internal set; }
17                 public int TryLength { get; internal set; }
18                 public ILExceptionHandlerType HandlerType { get; internal set; }
19                 public int HandlerOffset { get; internal set; }
20                 public int HandlerLength { get; internal set;}
21                 public int FilterOffset { get; internal set; }
22                 public TypeMirror CatchType { get; internal set; }
23
24                 internal ILExceptionHandler (int try_offset, int try_length, ILExceptionHandlerType handler_type, int handler_offset, int handler_length)
25                 {
26                         TryOffset = try_offset;
27                         TryLength = try_length;
28                         HandlerType = handler_type;
29                         HandlerOffset = handler_offset;
30                         HandlerLength = handler_length;
31                 }
32         }
33 }