Why wont my program execute the second catch block?
<p>I'm new to exception handling and this is a question about a problem I'm having on one of my first assignments on the subject. I have purposely gave the program an invalid entry for hours and seconds to test out the try/catch, so both should throw an exception.  I kind of get why the first catch block catches both throws, but I'm not sure then how to get it to use both catch blocks? Thanks! (output is "ERROR: INVALID HOUR ENTRY")</p>

<pre><code>int main()
{
MilTime Object;
string BadHour;
string BadSeconds;

try
{
if ( (Object.getHour() &lt; 0) || (Object.getHour() &gt; 2359) ) throw BadHour;
if ( (Object.getSec()  &lt; 0) || (Object.getSec()  &gt; 59  ) ) throw BadSeconds;
}
catch (string BadHour)
{
cout &lt;&lt; "ERROR, INVALID HOUR ENTRY";
}
catch (string BadSeconds)
{
cout &lt;&lt; "ERROR, INVALID SECOND ENTRY";
}
return 0;
</code></pre>