Throw activity clarification

Can I have New MyException(“My exception”). If it is possible what should be the datatype of myexception variable.

@Shashi123,

In Throw Activity, Write like this: new Exception(“your Exception”)

Use it like @lakshman said. If you want to store it in a variable you can use “System.Exception” datatype.

Hey @Shashi123

You can.

public class MyException: Exception
{
   public MyException(string message): base(message)
   {
   }
} 

Regards…!!
Aksh

2 Likes

Where should I write this. In throw activity. Or somewhere else. @aksh1yadav

The Exception property of the throw activity is where you should put this @Shashi123.