title: handle exceptions with attributes
body: <p>Can please someone explain, in a very easy/simple way, how to handle an exception via attributes?</p>
  
  <p>For example if I have simple code like this:</p>
  
  <pre><code>class Test{
  static void Main(string[] args){
      try {
              Console.WriteLine("div= "+ Division(0));
          }
          catch (DivideByZeroException e)
          {
              Console.WriteLine("Attempted divide by zero --&gt;" + e.Message);
          }
  
          Console.ReadLine();   
      }
  
      public static int Division(int i){  return 10 / i; }
  }
  </code></pre>
  
  <p>How can I change this code using attributes?</p>