Use two different exception types and stop throwing pointers.