If I do the following, how does the runtime determine the type of the thrown exception? Does it use RTTI for that?

try
{
  dostuff(); // throws something
}
catch(int e)
{
  // ..
}
catch (const char * e)
{
  // ..
}
catch (const myexceptiontype * e)
{
  // ..
}
catch (myexceptiontype e) // is this the same as the previous handler?
{
  // ..
}

See also:

How is the C++ exception handling runtime implemented?

Edit
Report