Skip to content

Handle exceptions from HTML module #2

Description

@bdukes

From the forums:

...error with community (5.05.01) when I use F3 3.4...
Error: F3 is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: Deleted 0 files, however, some files are locked. Could not delete the following files: D:\ptkonsulterna_dev\Portals\0\Cache\Modules\163_ACABA51644A302FBB325E30E7931BAF8.attrib.resources; at DotNetNuke.Services.ModuleCache.FileProvider.Remove(Int32 tabModuleId) at DotNetNuke.Entities.Modules.ModuleController.SynchronizeModule(Int32 moduleID) at DotNetNuke.Modules.Html.HtmlTextController.UpdateHtmlText(HtmlTextInfo objHtmlText, Int32 MaximumVersionHistory) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at DotNetNuke.Framework.Reflection.InvokeMethod(Type Type, String PropertyName, Object Target, Object[] Args) at Engage.Dnn.F3.HtmlTextModuleController.UpdateHtmlText(IHtmlTextInfo htmlTextInfo, Int32 maximumVersionHistory) at Engage.Dnn.F3.ViewLinks.CreateNewTextHtmlVersion(String searchValue, String replacementValue, Int32 moduleId, Int32 tabId, Int32 portalId, String content) at Engage.Dnn.F3.ViewLinks.ReplaceTextHtmlButton_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

It doesn't look like this is an issue caused directly by F3 (it comes from HtmlTextController.UpdateHtmlText calling ModuleController.SynchronizeModule). So, our main responsibility here is to make sure that we're handling the error properly. We can check how the HTML module would handle it, probably just make sure to handle the error within the module instead of letting it bubble up to the page.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions