Exception handling in DotNetNuke Container for debugging

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

Function GetPortalModuleBase in Library\Components\Skins\Container.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

   Debug.Assert(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

Imports System.Diagnostics

 

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() ,

\DNNLibrary\Components\Skins\Skin.vb -functions  LoadContainer and InjectModule.

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

posted @ Tuesday, January 17, 2006 1:46 PM
Print

Comments on this entry:

# re: Exception handling in DotNetNuke Container for debugging

Left by Hannes at 2/8/2006 5:01 AM
Gravatar
Hello Michael,

thank you for your link to DNNDebug.aspx.
This saved my day! I had this ...MinMax persitance.. exception and was unable to fix it.
Using DNNDebug I was able to save the problem in
5 minutes.

best regards
from bavaria
Hannes

# re: Exception handling in DotNetNuke Container for debugging

Left by Deepak at 1/14/2010 9:15 AM
Gravatar
Thanks for this knowledge you have shared... Its really nice.

Your comment:



(not displayed)

 
 
 
 
 

Live Comment Preview:

 
«April»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910