An internally defined exception doesn't have a name, but it has its own code.
When to use it?
If you know that your database operation might raise specific exceptions those which don't have names, then you can give them names so that you can write exception handlers specifically for them. Otherwis...