trying to implement this sample code to show last sql statement in the exception.
public class MyDb : Database
{
public MyDb(string connectionStringName) : base(connectionStringName) { }
public override void OnException(Exception e)
{
base.OnException(e);
e.Data["LastSQL"] = this.LastSQL;
}
}
but i am getting error on OnException.
cannot change access modifier when overriding protected inherited memeber 'Database.OnException'
Any idea.
The function override is protected and not public per the error message
should be