Access Exception Message from List of Exceptions

I created a list of Exceptions and would like to access each exception via a ForEach Loop. However, whenever I try to output the exception message (item.Message), I get an “Option strict disallow Late biding” error.
Additionally, it won’t allow me to assign “item” to an exception variable. Is there a way to convert on object to system.exception? What am I doing wrong here?
Thank you

Please, try it.

ForEach properties “TypeArgument”
change the setting Object to System.Exception.

1 Like

Hi @Francois_Marckendy_Joseph

As you created a list of exceptions, inside the For Each Loop you need to use item.ToString and not (item.Message).

and if you want to use ‘item’ as an exception variable you need to follow @hoshino1k suggestion


That worked. Thank you :smiley: :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.