Throws an appropriate exception based on the passed in error code.
@param code the DND error code
See Implementation
Throws an appropriate exception based on the passed in error code.
@param code the DND error code