fix compiler warnings for noexceptions

Is this only used in DEBUG build?