use throw with error class. fix bug when memcpyDefault resolved to D2D copy. [ROCm/hip commit: 250739666d]
250739666d