correctly handle platform error in rdj assembly

err is set, if reads==NULL, and in that case, your function should return an error indicator and not hard exit. The error reporting will be done by the runtime in that case.