Exception handling in DotNetNuke Container for debugging

I found another useful change in DNN core  to debug exceptions.

Function GetPortalModuleBase in LibraryComponentsSkinsContainer.vb silently catchs exception with comment

‘ module was not loaded correctly

I beleive that exception should not be catched at all, because nothing return after exception causes very unclear message

“MinMax persistance type of cookie requires a ModuleId“

but at least for debugging purposes catch should be replaced with the followning code. (UPDATE 9/6/2006: It seems that the error message fixed in DNN 3.3/4.1)

Catch exc As Exception

    ‘ module was not loaded correctly


False, exc.ToString)

End Try

It will make redundunt quite useful at the moment DNNDebug.aspx 

Don’t forget to add to the beginning of the file the line




Update: It seems that to show exception in GetPortalModuleBase is too late.

The original exception should be shown where controls are tried to load

i.e in Default.aspx.vb -function LoadSkin() ,

DNNLibraryComponentsSkinsSkin.vb -functions  LoadContainer and InjectModule.

I’ve posted this as a  suggestion to dotnetnuke support.