A custom exception is any class that extends Exception or a subclass of Exception.
In general, you should always extend StandardError or a descendant. The Exception family are usually for virtual-machine or system errors, rescuing them can prevent a forced interruption from working as expected.
# ...