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. 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>
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.
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.
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.
As I said, there is no way to know that.
I guess it's safe to catch the base Exception then.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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);
}
|
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....
|
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...
|
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:
|
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>):
| |
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
{
|
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.
|
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.
|
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.
--------------------------------------------------------------------------------
|
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...
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |