exception error

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2007
Posts: 1
Reputation: cwb01 is an unknown quantity at this point 
Solved Threads: 0
cwb01 cwb01 is offline Offline
Newbie Poster

exception error

 
0
  #1
Jun 16th, 2007
How do I handle an exception error if a user enters nothing or a letter into the input box when I have it declared as an integer.

--------------------------------------------------------------------------------
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: exception error

 
0
  #2
Jun 17th, 2007
Try...catch perhaps.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,849
Reputation: sk8ndestroy14 is an unknown quantity at this point 
Solved Threads: 1
sk8ndestroy14's Avatar
sk8ndestroy14 sk8ndestroy14 is offline Offline
Posting Virtuoso

Re: exception error

 
0
  #3
Jun 17th, 2007
You say that

if input is <= 0 then
whatever error message.

Anything entered that is not an integer, when the data type is integer, it is considered less than (or in some cases equal to) 0 if I am not mistaken. This should also take care of it if a user enters nothing (which I'm pretty sure is considered as a value of 0).
Disclaimer: Nothing I say can be considered credible information (I wonder what that means about this disclaimer then).
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC