why exceptions in ContentPartDriver.Editor[POST] get swallowed silently?

Topics: Troubleshooting, Writing modules
Mar 15, 2011 at 10:12 AM
Edited Mar 15, 2011 at 12:39 PM

I got/threw (unexpectedly) an exception inside the editor update method

 

protected override DriverResult Editor(MyPart part, IUpdateModel updater, dynamic shapeHelper)

 

but it gets swallowed silently and I get returned to the front end view containing the message "Your Page has been saved." -- LOL?!

The exception gets catched by "InvokeExtensions.Invoke<TEvents>(this IEnumerable<TEvents> events, Action<TEvents> dispatch, ILogger logger)" and there it is classified being not fatal and therefore is swallowed silently.

Coordinator
Mar 15, 2011 at 10:52 PM

File a bug?

Mar 25, 2011 at 11:21 AM
Edited Mar 25, 2011 at 12:21 PM

I can't say whether it's a bug since it seems to be on intension that the update is called through InvokeExtensions.Invoke<TEvents>() to keep the system alive and just log errors+warnings to log files.

I've put a breakpoint inside InvokeExtensions.Invoke and noticed other modules getting there on normal page rendering (ex. Frooth) where most likely the authors are not even aware of this -- if they don't look at the log files.

Would it do any harm including something like this into InvokeExtensions.Invoke's exception handler?:

 

#if !SkipCodeBreakPoints
    if (Debugger.IsAttached)
        Debugger.Break();
#endif