Trying to handle null values in this loop:
This works perfectly fine as I know what throws the error (null values) and it fine to have an empty array element (arrColInt(i))
So, this works as an On Error Resume Next and can't see any problem with it. Still, the IDE is not happy with this:
Empty Catch block. You should at least add a log.
Is there anything wrong with this? Would there be any mileage in having On Error Resume Next (+ On Error GoTo 0) and avoid
the IDE warning?
RBS
B4X:
Dim arrRow() As String
Dim arrColInt(Data.Size) As Int
For i = 0 To lUB
arrRow = DataTemp.Get(i)
Try
arrColInt(i) = arrRow(col)
Catch
'just do nil as QSort1DInt_IDX can cope with nulls
End Try
Next
This works perfectly fine as I know what throws the error (null values) and it fine to have an empty array element (arrColInt(i))
So, this works as an On Error Resume Next and can't see any problem with it. Still, the IDE is not happy with this:
Empty Catch block. You should at least add a log.
Is there anything wrong with this? Would there be any mileage in having On Error Resume Next (+ On Error GoTo 0) and avoid
the IDE warning?
RBS