Exception-handling optimisation
That is not really exception handling:

In your main() method:

You are branching on three different types of exceptions, but your action is the same: Print a message.
Doing so is fine, but the point for different catch blocks is not obvious to me.
Anyway:


Use std::cerr instead of std::cout for errors.
return 1 (or any value different from 0) if your program fails.


In runAlgorithm()

Generally you should only catch exceptions you want to handle.
And printing a message is not really handling an exception, that is more like cheap debugging.

You are catching the MyOtherException exception and ignoring it.
Why? Is it irrelevant to the algorithm? If so, why print a message? If not, why continue the algorithm? You might want to move the catch block out of the loop if it is fatal, or possibly remove it at all if you can't deal with it.

As a rule of thumb: Only catch an exception if


you can do something about it, this might be trying a different way to achieve the goal of your function
you want to wrap it inside a more appropriate exception, for example you could catch a low level io exception and wrap it in a parse exception explaining in more detail what went wrong
it is irrelevant to the calling function
it is the main method. C++ behaves ugly on uncaught exceptions.
But you should probably return 1 instead of 0.