473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

error handling - using ex in syntax

107 100+
Hello,
I am using code with exception handling
C# - have visual studio 2008
code:
try{int mysum=Int.Parse(textbox1.text);}
catch{messagebox.show("mistake" + ex.message);}

intellisense does not recognize ex.- is this syntax not correct syntax?
thank you
Jun 27 '09 #1
2 1523
tlhintoq
3,525 Expert 2GB
You haven't defines ex anyplace

catch (Exception ex)
{
// handle exception here
}
Jun 27 '09 #2
buddyr
107 100+
thank you that works
Jun 27 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
4
by: DJ Craig | last post by:
When I run a PHP script on my server that contains a syntax error, it gives me no information on the error; no error handling or anything just returns this blank page:...
10
by: David | last post by:
Hello I am trying to collect errors and record them in a table instead of a popup message stopping my code. It seems to work ok, but when I try to add ERR.Description to my code it fails on Syntax...
1
by: Roland | last post by:
Hi All, I'm trying to generate a C# wrapper for a Windows type library using the following command line ... csc /target:library /doc:Interop.MyLibrary.xml /unsafe Interop.MyLibrary.cs...
10
by: Anthony England | last post by:
(sorry for the likely repost, but it is still not showing on my news server and after that much typing, I don't want to lose it) I am considering general error handling routines and have...
7
by: monomaniac21 | last post by:
Hi all! How can you get rid of the error that displays if you do a query which returns no result and then try and fetch the array, WITHOUT having to put the while in another conditional like if...
2
by: trialproduct2004 | last post by:
Hi all, I want to catch error in stored procedure and return error message. I want to catch error 'Syntax error converting the varchar value 'a' to a column of data type int.' Means error...
2
by: Axel Gallus | last post by:
I am desperately looking for some resources dealing with error handling in c++. Don't get me wrong.... I have very detailed knowledge of exceptions, assertions and invariants, but what is...
4
by: MikeB | last post by:
I'm messing around with some sample code that I downloaded from a website (http://odnal.com/prosper-bid-sniper) that uses PHP objects and web services. When I upload it to my server, I get a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.