protected override void OnInit()

in src/DeloitteDigital.Atlas/Mvvm/UserControlView.cs [49:69]


        protected override void OnInit(EventArgs e)
        {
            try
            {
                // Initialise view model instance by the inheriting sub-layout
                ViewModel = InitialiseViewModel();
            }
            catch (Exception ex)
            {
                // Log unhandled exception to Sitecore log
                this.viewHelper.LogError(ex.ToString(), this);

                // Display error reactive warning control if available
                this.viewHelper.ShowReactiveWarning<IErrorWarning>(this);

                // Turn on the HasError flag
                HasError = true;
            }

            base.OnInit(e);
        }