I have created a custom atttribute class like this
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class AMemento : Attribute
{
public void method(){
try {
}
catch (Exception) {
}}
}
and I am planning to use this custom attribute in a handler to catch any exceptions occur their as follows
[AMemento]
[Authorize]
public JsonResult GetWeatherData()
{
//// code here which throw an exception
}
I want to know the way to complete the custom attribute class to capture an exception thrown in GetWeatherData() handler. Is it possible to implement like a higher order function like in python ?