I know sometimes innerException is null
So the following might fail:
repEvent.InnerException = ex.InnerException.Message;
Is ther
It is possible to use an exception filter to get more precise aiming.
catch (Exception ex) when (ex.InnerException != null) {...}
Please find more details here