Get Exception details

I am getting following exception:

UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: <webctrl name=‘new00N3000000CBWZZ’ tag=‘INPUT’ /> —> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector: <webctrl name=‘new00N3000000CBWZZ’ tag=‘INPUT’ />
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner exception stack trace —
at UiPath.Core.Activities.TaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

For the above exception, I want to only first line and store it in the file.
How can this achieve?
Also, can i get the actiity where exception occured?

@Ajinkya_Deshmukh

Cover this activity with try catch
In catch section select system exception
Use assign stage
Excep = exception.message

This will probably your answer