I want action or some thing to know current error or exception type

i need away to know type of exception or error currently occur  to pass it to an action as input and do some logic

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.