Passing Arguments into Global Exception Handler

I’m having trouble passing arguments into the Global Exception Handler, specifically the config arg. I can pass any type of string variable, but don’t know the syntax for iterating through the config dictionary.

for string, I use`

errorInfo.Variables(“str”)

`

Any help is appreciated.

loop through config using foreach
(typeArgument = keyValuePair(string,object)

in the loop set
errorInfo.Variables(item.Key) = item.Value

I tried what you mentioned above and it didnt work. The variable type within the exception handler is UiPath.Activities.Contracts.ExceptionHandlerArgs, and it produces a variable like below. I’m having trouble iterating through the “out_Config”, Dictionary<string, object>(18) . Any ideas?

Dictionary<string, object>(2) 
{
  
  {
    "str",
    "brad" 
  },
  
  {
    "out_Config",
    Dictionary<string, object>(18) 
    {
      
      {
        "OrchestratorQueueName",
        "KibanaDemoQueue" 
      },
     
      {
        "DelayShort",
        1000 
      },
      
      {
        "DelayMedium",
        15000 
      }

    }
  }
  
 
}

with directcast you can convert the object from outer dictionary (of string, object) into a dictionary

DirectCast(yourDict("out_Config"), Dictionary(Of String, Object))

1 Like

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