raise the appropriate custom exception