06-03-2024 02:35 PM
I have a BR that runs a load process using ExecuteParseAndTransform. When the data source is empty for that profile it throws the "No valid DataKeys" error and stops the job. I don't even get the opportunity to check the status code of the import.
Is there a way to catch that error when using the ExecuteParseAndTransform method?
Thanks,
Scott
Solved! Go to Solution.
06-04-2024 03:46 AM
Hi, You can capture the exception and check the exception message
07-26-2024 11:03 AM
Try
ImportInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, wfClusterPk, String.Empty, Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)
Catch ex As Exception
log.AppendLine(ex.ToString)
End Try
This is what I am doing.
06-04-2024 03:46 AM
Hi, You can capture the exception and check the exception message
06-04-2024 12:26 PM
Thank you, I missed the obvious. I was catching the error, but then I was throwing an exception. If I just capture the error and move on, I am good.
07-26-2024 09:29 AM
Hi,
Do you know how you can catch the error, when I ouput my exception message, it's seem to be blank.
Regards,
Seang
07-26-2024 11:03 AM
Try
ImportInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, wfClusterPk, String.Empty, Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)
Catch ex As Exception
log.AppendLine(ex.ToString)
End Try
This is what I am doing.
07-26-2024 11:17 AM
Thank for your update.
I that message is to technical and long.
I used a shorter version
failureSummary.AppendLine(ex.StackTrace.ToString)