473,698 Members | 2,398 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 1484
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
3669
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
1741
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
4880
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
7508
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
20174
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
7782
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
2242
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
1070
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
8888
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
8678
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
8609
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
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
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,...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
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
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.