473,734 Members | 2,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Method Exception information

PGP
Where will i look to find potential exceptions thrown by a method? I am
looking at Object Browser and couldnt find any, MSDN doesnt seem to provide
a consistent format for this either. Any advice would be appreciated.
Apr 2 '07 #1
6 1486
Hello PGP" priyesh_do_not_ reply,

Which method, for example?
u cat use reflector either.
If u found nothing it can be that method throws nothing

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

PWhere will i look to find potential exceptions thrown by a method? I
Pam looking at Object Browser and couldnt find any, MSDN doesnt seem
Pto provide a consistent format for this either. Any advice would be
Pappreciated.
P>
Apr 2 '07 #2
There is no way to know that.
"PGP" <priyesh_do_not _replywrote in message
news:uJ******** ******@TK2MSFTN GP05.phx.gbl...
Where will i look to find potential exceptions thrown by a method? I am
looking at Object Browser and couldnt find any, MSDN doesnt seem to
provide a consistent format for this either. Any advice would be
appreciated.

Apr 2 '07 #3
Hi,

Sorry, wrong key combination :)

As I said, there is no way to know that.

You could use reflector and try to see the method and see what exception the
method throw, but even so if the method use other methods these could also
throw exceptions (not catched by your method) that you will have to deal
with.

"PGP" <priyesh_do_not _replywrote in message
news:uJ******** ******@TK2MSFTN GP05.phx.gbl...
Where will i look to find potential exceptions thrown by a method? I am
looking at Object Browser and couldnt find any, MSDN doesnt seem to
provide a consistent format for this either. Any advice would be
appreciated.

Apr 2 '07 #4
PGP
Which method, for example?
I was looking at XMLSerializer.D eserialize. I have a scenario where a class
loads internal data from a config xml and was wondering what exception to
catch if load fails.
Apr 2 '07 #5
PGP
As I said, there is no way to know that.
I guess it's safe to catch the base Exception then.
Apr 2 '07 #6
Hi,

Yes, you can always catch Exception ,

I have to confess I do most of the times :-)

"PGP" <priyesh_do_not _replywrote in message
news:uK******** ******@TK2MSFTN GP04.phx.gbl...
>As I said, there is no way to know that.
I guess it's safe to catch the base Exception then.

Apr 3 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3675
by: Mike Schilling | last post by:
I have some code that calls methods reflectively (the method called and its parameters are determined by text received in a SOAP message, and I construct a map from strings to MethodInfos). The code that does the call looks roughly like: try { // do reflective call response = method.Invoke(obj, params); }
1
1742
by: Greif | last post by:
I am trying to call a static method within a sealed class. However, the wrong method keeps getting called instead. In a seperate class I am calling the following code: LogHelper.Log("Sample Exception", ex, LogLevel.ERROR); Here is the weird thing, the public static void Log(string message, LogLevel level) method is always called instead of the public static void Log(string message, Exception e, LogLevel level) method. I don't know why....
1
4887
by: Mark Miller | last post by:
I just recently started getting the above error on a page I am posting MULTIPART/FORM-DATA. We have SoftArtisans FileUp component and Filter installed on the server in question and up until a day or so ago everything was working fine. I honestly can't remember changing anything since it was last working. But I tried reinstalling the .Net Framework along w/ the service pack, which didn't work. I also had v1.1 already installed but I hadn't...
1
7510
by: Phil Sandler | last post by:
Hello all, Thanks in advance for any help with this. I am trying to get sample code to run from Michael Russell's excellent article on removing whitespace: http://www.codeproject.com/aspnet/WhitespaceFilter.asp I have also tried his updated version, which can be found (in a zip file) here:
2
20177
by: GlennLanier | last post by:
Hello, I've searched the forums and can't find an answer -- if it i there, kindly point me in that direction. I would like to simulate a browser POSTing a FORM and be able to pars the response. I have the following code in my Page_Load (litResponse is defined a <ASP:Literal>):
3
7784
by: Koen | last post by:
Hi, I have been reading a bit basic stuff about method attributes in C#, and I wanted to build the following functionality with it: if a method has the custom attribute <LogException> the method has to be wrapped as follows: try {
5
2245
by: Earl | last post by:
I need to call a method on an owned child form, and am wondering if the best way of doing this is to capture the Closing event of the form that passes control back to the form where I have the method. The structure is like so: frmMain (MDI, runs on app start) calls frmB (MDI child), which in turn calls frmC (MDI child), which in turn calls frmD (MDI child). frmMain and frmB remain open while frmC and frmD are shown.
0
1075
by: Aled G | last post by:
Hi, After upgrading to .net 3.5, my web app is giving the error on all .aspx pages: " Method not found: 'System.Security.NamedPermissionSet System.Web.HttpRuntime.GetNamedPermissionSet()' " ....on an app which worked just fine before.
3
8892
by: Fred | last post by:
Hello, I get this strange error in the code of a very simple aspx page just called to download a file. Do you have any idea about it ? (The same code works fine on another server) Server Error in '/' Application. --------------------------------------------------------------------------------
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.