This should probably throw an exception if `isDebug` is true.