Does Kentico handle unhandled errors in a custom web part ( CMSAbstractWebPart )? In the past I saw a message "Error in webpart..." on the webpart's placeholder, but in a new case the error took down the whole page ( server error ).
In my case I had a System.InvalidOperationException.
To answer your question, Kentico does not handle the errors. It will log the error to the event log but it's up to you to actually handle the exception. As Laura suggests, wrap your code in a try{}catch{} block if you want to actually handle it.
try{}catch{}
I like to wrap custom things in a try catch that uses the kentico event log
try{ } catch(Exception ex){ EventLogProvider.LogEvent(EventType.ERROR, "API Example", "APIEXAMPLE", eventDescription: ex.Message); }
Please, sign in to be able to submit a new answer.