CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.dotnetnuke.custom_modules Tags:
Item Type: NewsGroup Date Entered: 3/3/2006 7:25:25 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 11 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
NDLanding
Asp.Net User
Please help with error handling3/3/2006 7:25:25 PM

0/0

Hi

Please could someone explain how to handle errors using DotNetNuke inbuilt classes. I've developed a module and just to see how it worked I placed the following code in a button click event.

Try
   Dim a As Integer
   Dim b As Integer
   Dim c As Integer
   b = 1
   c = 0
   a = b / c
Catch ex As Exception
   Dim errMsg As String
   errMsg = ex.Message
   ProcessModuleLoadException(Me, ex)
End Try

As I step through the code I can see that an error is generated - the message is something like a division by zero error which I expected - however when I let the code run through eventually the following gets displayed on my page:

A critical error has occurred.
Object reference not set to an instance of an object.

Is this normal and if so how do I get the actual error to be displayed to the user? (I'm not sure if it makes a difference but my module is a multi-interface one. My module comprises of a single control essentially into which other user controls are loaded at runtime - all of the user controls implement Entities.Modules.PortalModuleBase though. The error is occuring in one of the child controls).

Thanks,

Norm

AerosSaga
Asp.Net User
Re: Please help with error handling3/6/2006 9:34:40 PM

0/0

NDLanding wrote:

Try
   Dim a As Integer
   Dim b As Integer
   Dim c As Integer
   b = 1
   c = 0
   a = b / c
Catch ex As Exception
   ProcessModuleLoadException(Me, ex)
End Try

DNN does the rest. If you have any other code you want to execute just use a finally.




Regards,

Scott Schecter
EntitySpaces
Schecter Technology Solutions
NDLanding
Asp.Net User
Re: Please help with error handling3/9/2006 10:43:37 AM

0/0

Hi AerosSaga,

Thanks for the reply. It doesn't seem to be doing what one might expect. As I said it gives me that weird error message - which doesn't indicate to the user what has gone wrong.

Norm

AerosSaga
Asp.Net User
Re: Please help with error handling3/9/2006 2:01:45 PM

0/0

Well I think what your saying is you don't want dnn to handle any of your error routine. If that is in fact the case just remove the ProcessModuleLoadException and insert your own code there.

Regards,

Scott Schecter
EntitySpaces
Schecter Technology Solutions
NDLanding
Asp.Net User
Re: Please help with error handling3/10/2006 9:58:07 AM

0/0

Hi,

Thanks for your continued interest. No, I do want DNN to handle errors - it's just that I dont think it is working as expected. Through trial and error I've found that if I pass me.parent to ProcessModuleLoadException it works as I would expect - i.e. the correct error message is displayed (or indeed a custom message if I so wish). It may have soemthing to do with the design of my module - essentially I load user controls at runtime into a placeholder on my view control.

Norm

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning JavaServer Pages Authors: Vivek Chopra, Jon Eaves, Rupert Jones, Sing Li, John T. Bell, Pages: 1262, Published: 2005
Access 2007 VBA Programmer's Reference Authors: Teresa Hennig, Robert G. Cooper, Rob Cooper, Geoffrey L. Griffith, Armen Stein, Pages: 1110, Published: 2007
Sams Teach Yourself Javascript in 24 Hours Authors: Michael Moncur, Pages: 442, Published: 2006
Perl Best Practices: Standards and Styles for Developing Maintainable Code Authors: Damian Conway, Pages: 517, Published: 2005
Oracle PL/SQL for Dummies Authors: Michael Rosenblum, Paul Dorsey, Pages: 414, Published: 2006
Visual Basic 2005: The Complete Reference Authors: Ron Petrusha, Pages: 874, Published: 2006
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006
Designing Highly Useable Software Authors: Jeffrey M. Cogswell, Pages: 342, Published: 2004
VoiceXML: Strategies and Techniques for Effective Voice Application Development with VoiceXML 2.0 Authors: Chetan Sharma, Jeff Kunins, Pages: 469, Published: 2002

Web:
Java Errors and Error Handling - PLEASE help me!!! Java Errors and Error Handling - PLEASE help me! ... use -help for a list of possible options. Could someone PLEASE let me know what I need to do to fix ...
ATutor: Forums: error handling. please help ATutor is a free Open Source Web-based Learning Content Management System (LCMS/ LMS) designed with accessibility and adaptability in mind.
Database Error Handling - please help - bytes Aug 28, 2006 ... Hi All, I have a couple of stored procedures written in SQL 2000. Given below one sp.
[R] Help about exception handling in r-project. Nov 5, 2007 ... I like to know how to do error handling in R. > > I want to write the WARNING MESSAGES to a text file and exit R. Please help me with a ...
Java Errors and Error Handling - IOException problems......Please Help Java Errors and Error Handling - IOException problems......Please Help ... Posts :2. Registered: 10/14/08. IOException problems......Please Help ...
System Error Codes (Windows) Can you please help me with this error??... I want to install Microsoft Windows Malicious Software Removal Tool v2.0...! Thanks, ...
CodeProject: Exception Handling Best Practices in .NET. Free ... Design guidelines for exception handling in .NET which will help you to create more ... Please help. I really want to know why this error is taking place. ...
PHPBuilder.com, the best resource for PHP tutorials, templates ... Error handling when page not found, Anushree, 05/22/02 10:01 ... If you are looking for help, please post on the appropriate forum here. ...
newswhat.com [borland.public.delphi.language.delphi.general] I DO have SysUtils in my USES clause.... Any help would be greatly appreciated. Thanks GS. Re: Problem with exception handling: Please help ...
Error handling - MS Access and FileMaker Pro Error handling - MS Access and FileMaker Pro Community and Forum - Our MS Access forum is ... Please help me in setting focus to that particulat text box. ...

Videos:
Orlando Florida Aircraft & Boating Accident Attorney Lawyer www.MartindaleLawGroup.com www.SuAbogadoOrlando.com Abogados en Orlando Abogados en Orlando Abogados en Kissimmee Abogados en Kissimmee ...
dbdvrf #18 Debian Developer's Reference http://packages.debian.org/sid/developers-reference - - this server are described in the BTS control server documentation. 5.8.1. Monitoring bugs ...
WCN # 176 - World Chess News - ( Mitt i Schack ) This episode contains of: * * Chesshistory: ----------- Since the start in August 2004, more and more channels have started broadcasting ...
Japan Wood Hannya Demon Mask - Noh-Kyogen no Kazarimen Description Antique hand-carved wooden Japanese Hannya demon display mask (kazarimen). The Hannya mask is possibly one of the best known and ...
Mechatronics Mechanical System Control - It's the Software! Google Tech Talks September 21, 2006 David Auslander ABSTRACT The history of mechanical system control is one of striving for ever greater ...
Crazy drunk dancer DVLH Crazy drunk dancer. Zach V http://www.lukehadley.com "Creep" is the first single (not counting the Drill EP) released by the English rock ...
Small Japanese Hannya Demon Mask - Noh-Kyogen Kazarimen Description Small resin Japanese Hannya demon display mask (kazarimen). The Hannya mask is possibly one of the best known and most famous of ...
PBS Free to Choose 1990 Vol. 1 of 5 - The Power of the Market Free to Choose 1990 Volume 1 - The Power of the Market Topic: The Power of the Market to Promote Prosperity and Freedom ABSTRACT Dr ...
Currency College Chapter 9 Trading Intl has taken the time archive educational videos that include not only information you need, but these videos allow for unlimited access ...
Provoked: A True Story Provoked is the true story of Kiranjit Ahluwalia, a Punjabi woman who moved to London after her marriage with Deepak Ahluwalia. Her husband seemed ...




Search This Site:










how to include a file from an external server in an asp page

column 'invariantname' is constrained to be unique

creating dlls

dnn user name renaming in 3.x

stylesheet editor

blog module error 3.10 - a critical error has occurred.

dotnetnuke and flash objects

ssl query

token sitesettings text box title

visual web developer 2005 express edition

add a child node to the selected node of treeview???????

enable site to display on mobile phone?

how to: add a default listitem to a dropdownlist

createuserwizard1_nextbuttonclick doesn't seem to fire

prevent other sites from bandwidth stealing images.

this cannot, cannot be true...

server error when running visual application!?

using findcontrol with the ie tabstrip control

web-based client ftp

looking for a free nice menu component for asp.net...

need to provide a "please wait" status to user while sending emails followed by a "emails sent" status.

security and dnn

setting a skin on a custom server control

vs 2005 and fpse on a remote server or not???

permission required to start/stop system services

binding data to a treenode in a treeview

database script for dnn 2.0

text alignment on a textbox

help on working with dal and bll classes

internet explorer won't display my page

 
All Times Are GMT