title: No Source Available throw
body: <p>I'm trying to look at an element at an invalid index to test my error catching, nut I keep getting a No Source Available when I try to debug it or a Unhanded Exception Error when I try to run it normally:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "MyArray.h"
  
  using namespace std;
  
  int main()
  {
      MyArray&lt;int&gt; arr1;
      MyArray&lt;int&gt; arr2(2);
  
      arr2.Add(11);
      arr2.Add(22);
      arr2.Add(33);
  
      arr2.At(5); // Test to check error
  
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p><code>arr2.At(5);</code> calls this function in my MyArray.h file, where I'm getting my error:</p>
  
  <pre><code>// MyArray.h
  template &lt;class elemType&gt;  
  elemType &amp; MyArray&lt;elemType&gt;::At(int index)
  {
      if (index &lt; 0 || index &gt;= _size)
          throw "elemType &amp; MyArray&lt;elemType&gt;::At(int index) Index out of range!"; // Where the problem is
  
      return list[index];
  }
  </code></pre>
  
  <p>Error that I get when I run it normally:</p>
  
  <pre><code>Unhandled exception at 0x763ec41f in MyArrayProject.exe: Microsoft C++ exception: char at memory location 0x0032fa60..
  </code></pre>
  
  <p>Error that I get when I tried to debug it at <code>arr2.At(5);</code> and it hits <code>throw "elemType &amp; MyArray&lt;elemType&gt;::At(int index) Index out of range!";</code>:</p>
  
  <pre><code>No Source Available
  There is no source code available for the current location.
  
  Call stack location:
      msvrc100d.dll!_CxxThrowException(void * pExceptionObject, const_s__ThrowInfo) Line 91
  </code></pre>
  
  <p>Haven't experienced this error before and unsure of how to fix it, any help would be much appreciated! :)</p>