You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow custom exception handling for application defined Exception types.
E.g. I have a custom exception (EFHIRException) that has additional properties and a method to render it as an XML string. I have added a function "AsXMLString" to the exception class.
I have made a change to the TMVCEngine class and added an event property to surface the Exception prior to standard exception handling occurring.
TMVCExceptionEvent = procedure(E: Exception; SelectedController: TMVCController; WebContext: TWebContext; var ExceptionHandled: Boolean) of object;
Assign an event handler to the MVCEngine object and set ExceptionHandled to true if your code has handled/rendered the Exception.
I will post proposed changes and a simple sample project.
Looking for feedback and improvements, and hopefully a git pull request into the code base.
The text was updated successfully, but these errors were encountered:
Allow custom exception handling for application defined Exception types.
E.g. I have a custom exception (EFHIRException) that has additional properties and a method to render it as an XML string. I have added a function "AsXMLString" to the exception class.
I have made a change to the TMVCEngine class and added an event property to surface the Exception prior to standard exception handling occurring.
TMVCExceptionEvent = procedure(E: Exception; SelectedController: TMVCController; WebContext: TWebContext; var ExceptionHandled: Boolean) of object;
Assign an event handler to the MVCEngine object and set ExceptionHandled to true if your code has handled/rendered the Exception.
I will post proposed changes and a simple sample project.
Looking for feedback and improvements, and hopefully a git pull request into the code base.
The text was updated successfully, but these errors were encountered: