Cleaned up error handling by introducing the DAI_THROWE macro.