Use variable while sending mail using Rethrow activities

How to send exception message via mail using throw/Rethrow activity?


first have a try catch for entire sequence

in try have that throw activity (example any business exception)

so in catch use that mail activity

example screenshots for reference



HI @Riya_Sharma

You can follow the suggestion given by @nikhil.girish

In the mean time you can also surround only the throw and rethrow activity and use the same steps given by him.


1 Like

Hey @Riya_Sharma

This is how I do it:

Create a Global Exception Handler. Create a send Outlook Exception Mail workflow. Invoke the workflow in the Global Exception Handler passing in the exception details as an argument.

Kind Regards

How to pass this exception message in body of mail?
do i have to create one common variable for all the unhandled exception?


Use Exception.Message in your body of email

so whatever message u had given in throw reflects in body

I have tried a same but unable to send exact exception message

bot is send this kind of exception message inplace of exact exception message.
So how to pass exact exception message?


So its not a predefined message i believe , its a system exception message
so configure in catch block accordingly

could u please send a example of it?

thanks! (1.8 KB)

Hi please find the above one, thts just an idea for you how throw , catch works along with exception message

but in this case also bot which send predefined exception message not a exact.

Is there any way to send a exact exception message?

ya u can send exact

remove throw …let it fail where ever it wants

so in catch the full failed message will be exception.message (2.1 KB)

Can we make use of rethrow activity?

refer my above code

Still not getting exact exception message.